|  |  |  | @ -44,6 +44,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   Future<void> getUserAutoLoginToken() async { | 
		
	
		
			
				|  |  |  |  |     String userName = AppState().memberInformationList!.eMPLOYEEEMAILADDRESS!.split("@").first.toString(); | 
		
	
		
			
				|  |  |  |  |     //userName | 
		
	
		
			
				|  |  |  |  |     Response response = | 
		
	
		
			
				|  |  |  |  |         await ApiClient().postJsonForResponse("${ApiConsts.chatServerBaseApiUrl}user/desktopuserlogin", {"userName": userName, "password": "FxIu26rWIKoF8n6mpbOmAjDLphzFGmpG", "loginType": 2}); | 
		
	
		
			
				|  |  |  |  |     login.UserAutoLoginModel userLoginResponse = login.userAutoLoginModelFromJson(response.body); | 
		
	
	
		
			
				
					|  |  |  | @ -84,8 +85,9 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { | 
		
	
		
			
				|  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     pChatHistory = recentChat.response; | 
		
	
		
			
				|  |  |  |  |     pChatHistory!.sort((ChatUser a, ChatUser b) => a.userName!.toLowerCase().compareTo(b.userName!.toLowerCase())); | 
		
	
		
			
				|  |  |  |  |     pChatHistory = recentChat.response == null ? [] : recentChat.response; | 
		
	
		
			
				|  |  |  |  |     if (pChatHistory != null) pChatHistory!.sort((ChatUser a, ChatUser b) => a.userName!.toLowerCase().compareTo(b.userName!.toLowerCase())); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     searchedChats = pChatHistory; | 
		
	
		
			
				|  |  |  |  |     isLoading = false; | 
		
	
		
			
				|  |  |  |  |     notifyListeners(); | 
		
	
	
		
			
				
					|  |  |  | @ -164,7 +166,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { | 
		
	
		
			
				|  |  |  |  |       await hubConnection.start(); | 
		
	
		
			
				|  |  |  |  |       hubConnection.on("OnUpdateUserStatusAsync", changeStatus); | 
		
	
		
			
				|  |  |  |  |       hubConnection.on("OnDeliveredChatUserAsync", onMsgReceived); | 
		
	
		
			
				|  |  |  |  |    //   hubConnection.on("OnSeenChatUserAsync", onChatSeen); | 
		
	
		
			
				|  |  |  |  |       //   hubConnection.on("OnSeenChatUserAsync", onChatSeen); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |       //hubConnection.on("OnUserTypingAsync", onUserTyping); | 
		
	
		
			
				|  |  |  |  |       // hubConnection.on("OnUserCountAsync", userCountAsync); | 
		
	
	
		
			
				
					|  |  |  | @ -288,7 +290,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { | 
		
	
		
			
				|  |  |  |  |     //   } | 
		
	
		
			
				|  |  |  |  |     // }); | 
		
	
		
			
				|  |  |  |  |     notifyListeners(); | 
		
	
		
			
				|  |  |  |  |   //  if (isChatScreenActive) scrollToBottom(); | 
		
	
		
			
				|  |  |  |  |     //  if (isChatScreenActive) scrollToBottom(); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void onUserTyping(List<Object?>? parameters) { | 
		
	
	
		
			
				
					|  |  |  | @ -402,17 +404,16 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { | 
		
	
		
			
				|  |  |  |  |             ) | 
		
	
		
			
				|  |  |  |  |           : null, | 
		
	
		
			
				|  |  |  |  |     ); | 
		
	
		
			
				|  |  |  |  |     String chatData = | 
		
	
		
			
				|  |  |  |  |         '{"contant":"${message.text}","contantNo":"${uuid.v4()}","chatEventId":$chatEventId,"fileTypeId": $fileTypeId,"currentUserId":${AppState().chatDetails!.response!.id},"chatSource":1,"userChatHistoryLineRequestList":[{"isSeen":false,"isDelivered":false,"targetUserId":$targetUserId,"targetUserStatus":1}],"chatReplyId":$chatReplyId,"conversationId":"${uuid.v4()}"}'; | 
		
	
		
			
				|  |  |  |  |     await hubConnection.invoke("AddChatUserAsync", args: <Object>[json.decode(chatData)]); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     userChatHistory.insert(0, data); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     isFileSelected = false; | 
		
	
		
			
				|  |  |  |  |     isMsgReply = false; | 
		
	
		
			
				|  |  |  |  |     sFileType = ""; | 
		
	
		
			
				|  |  |  |  |     message.clear(); | 
		
	
		
			
				|  |  |  |  |     notifyListeners(); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     String chatData = | 
		
	
		
			
				|  |  |  |  |         '{"contant":"${message.text}","contantNo":"${uuid.v4()}","chatEventId":$chatEventId,"fileTypeId": $fileTypeId,"currentUserId":${AppState().chatDetails!.response!.id},"chatSource":1,"userChatHistoryLineRequestList":[{"isSeen":false,"isDelivered":false,"targetUserId":$targetUserId,"targetUserStatus":1}],"chatReplyId":$chatReplyId,"conversationId":"${uuid.v4()}"}'; | 
		
	
		
			
				|  |  |  |  |     await hubConnection.invoke("AddChatUserAsync", args: <Object>[json.decode(chatData)]); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void sendChatMessage(int targetUserId, String targetUserName) async { | 
		
	
	
		
			
				
					|  |  |  | 
 |