|
|
|
|
@ -485,7 +485,8 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
image: image,
|
|
|
|
|
isImageLoaded: isImageLoaded);
|
|
|
|
|
isImageLoaded: isImageLoaded,
|
|
|
|
|
);
|
|
|
|
|
userChatHistory.insert(0, data);
|
|
|
|
|
isFileSelected = false;
|
|
|
|
|
isMsgReply = false;
|
|
|
|
|
@ -502,7 +503,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
dynamic contain = searchedChats!.where((ChatUser element) => element.id == targetUserId);
|
|
|
|
|
if (contain.isEmpty) {
|
|
|
|
|
searchedChats!.add(
|
|
|
|
|
ChatUser(id: targetUserId, userName: targetUserName, unreadMessageCount: 0),
|
|
|
|
|
ChatUser(id: targetUserId, userName: targetUserName, unreadMessageCount: 0, isImageLoading: false, image: null, isImageLoaded: false),
|
|
|
|
|
);
|
|
|
|
|
notifyListeners();
|
|
|
|
|
}
|
|
|
|
|
@ -759,5 +760,4 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
print("Error: $e");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|