Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/RCandidate'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vienna-PRU committed Jul 24, 2023
2 parents 87e6ea2 + c4cb647 commit d398186
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
16 changes: 15 additions & 1 deletion VIS/Areas/VIS/Models/Chat/ChatModel.cs
Expand Up @@ -87,6 +87,18 @@ public ChatModel(Ctx ct, int windowNo, int CM_Chat_ID, int AD_Table_ID, int Reco
// LayoutRootChat.Background = new SolidColorBrush(DataBase.GlobalVariable.WINDOW_BACK_COLOR);
// EventHander();
// when chatId is zero

#region check chat exist
//Date : 18 Jul 2023
//Developer :Lakhwinder
//There is a preventive check to improve performance to load only 10000 chats while loading window
//Sometime Chat exists but ID comes 0 , so here check once again that chat exist for this record
if (CM_Chat_ID == 0)
{
CM_Chat_ID = Util.GetValueOfInt(DB.ExecuteScalar("SELECT CM_Chat_ID FROM CM_Chat WHERE AD_Table_ID="+AD_Table_ID+" AND Record_ID="+Record_ID,null,trxName));
}
#endregion

if (CM_Chat_ID == 0)
{
//set chat from MChat class first time
Expand Down Expand Up @@ -231,7 +243,8 @@ public ChatInfo GetHistory(String confidentialType, MChat _chat, int page, int p




//retrive chatid
cinfo.chatId = _chat.GetCM_Chat_ID();
cinfo.subChat = subscribedChat;
cinfo.userimages = imgIds;
return cinfo;
Expand Down Expand Up @@ -345,6 +358,7 @@ public class UserImages

public class ChatInfo
{
public int chatId { get; set; }
public List<UserImages> userimages { get; set; }
public List<LatestSubscribedRecordChat> subChat { get; set; }
}
Expand Down
2 changes: 1 addition & 1 deletion VIS/Areas/VIS/Scripts/VIS.all.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion VIS/Areas/VIS/Scripts/app/Framework/chat.js
Expand Up @@ -99,8 +99,10 @@
function init($container, windowNo, prop) {

VIS.dataContext.getChatRecords(prop, function (result) {

var data = JSON.parse(result);
//set retrieved chatid in local var
self.prop.ChatID = data.chatId;
var htmll = "";
for (var chat in data.subChat) {

Expand Down
2 changes: 1 addition & 1 deletion VIS/Properties/AssemblyInfo.cs
Expand Up @@ -32,4 +32,4 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("2.4.8.0")]
[assembly: AssemblyFileVersion("2.4.11.0")]

0 comments on commit d398186

Please sign in to comment.