|  |  |  | @ -325,8 +325,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   Future<void> onMsgReceived(List<Object?>? parameters) async { | 
		
	
		
			
				|  |  |  |  |     List<SingleUserChatModel> data = []; | 
		
	
		
			
				|  |  |  |  |     List<SingleUserChatModel> temp = []; | 
		
	
		
			
				|  |  |  |  |     List<SingleUserChatModel> data = [], temp = []; | 
		
	
		
			
				|  |  |  |  |     for (dynamic msg in parameters!) { | 
		
	
		
			
				|  |  |  |  |       data = getSingleUserChatModel(jsonEncode(msg)); | 
		
	
		
			
				|  |  |  |  |       temp = getSingleUserChatModel(jsonEncode(msg)); | 
		
	
	
		
			
				
					|  |  |  | @ -349,10 +348,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     dynamic contain = searchedChats!.where((ChatUser element) => element.id == data.first.currentUserId); | 
		
	
		
			
				|  |  |  |  |     if (contain.isEmpty) { | 
		
	
		
			
				|  |  |  |  |       searchedChats!.add( | 
		
	
		
			
				|  |  |  |  |         ChatUser(id: data.first.currentUserId, userName: data.first.currentUserName, unreadMessageCount: 0, isImageLoading: false, image: "", isImageLoaded: true), | 
		
	
		
			
				|  |  |  |  |       ); | 
		
	
		
			
				|  |  |  |  |       notifyListeners(); | 
		
	
		
			
				|  |  |  |  |       searchedChats!.add(ChatUser(id: data.first.currentUserId, userName: data.first.currentUserName, unreadMessageCount: 0, isImageLoading: false, image: "", isImageLoaded: true, userStatus: 1)); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     setMsgTune(); | 
		
	
	
		
			
				
					|  |  |  | @ -365,16 +361,24 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { | 
		
	
		
			
				|  |  |  |  |           user.unreadMessageCount = tempCount + 1; | 
		
	
		
			
				|  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       sort(); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     List list = [ | 
		
	
		
			
				|  |  |  |  |       {"userChatHistoryId": data.first.userChatHistoryId, "TargetUserId": temp.first.targetUserId, "isDelivered": true, "isSeen": isChatScreenActive ? true : false} | 
		
	
		
			
				|  |  |  |  |     ]; | 
		
	
		
			
				|  |  |  |  |     updateUserChatHistoryOnMsg(list); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     notifyListeners(); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void sort() { | 
		
	
		
			
				|  |  |  |  |     searchedChats!.sort( | 
		
	
		
			
				|  |  |  |  |       (ChatUser a, ChatUser b) => b.unreadMessageCount!.compareTo( | 
		
	
		
			
				|  |  |  |  |         a.unreadMessageCount!, | 
		
	
		
			
				|  |  |  |  |       ), | 
		
	
		
			
				|  |  |  |  |     ); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void onUserTyping(List<Object?>? parameters) { | 
		
	
		
			
				|  |  |  |  |     for (ChatUser user in searchedChats!) { | 
		
	
		
			
				|  |  |  |  |       if (user.id == parameters![1] && parameters[0] == true) { | 
		
	
	
		
			
				
					|  |  |  | @ -468,9 +472,9 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { | 
		
	
		
			
				|  |  |  |  |       Uint8List? image, | 
		
	
		
			
				|  |  |  |  |       required bool isImageLoaded}) async { | 
		
	
		
			
				|  |  |  |  |     Uuid uuid = const Uuid(); | 
		
	
		
			
				|  |  |  |  |     var contentNo = uuid.v4(); | 
		
	
		
			
				|  |  |  |  |     String contentNo = uuid.v4(); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     var msg = message.text; | 
		
	
		
			
				|  |  |  |  |     String msg = message.text; | 
		
	
		
			
				|  |  |  |  |     SingleUserChatModel data = SingleUserChatModel( | 
		
	
		
			
				|  |  |  |  |       chatEventId: chatEventId, | 
		
	
		
			
				|  |  |  |  |       chatSource: 1, | 
		
	
	
		
			
				
					|  |  |  | 
 |