|
|
|
@ -270,6 +270,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
];
|
|
|
|
];
|
|
|
|
updateUserChatHistoryStatusAsync(data);
|
|
|
|
updateUserChatHistoryStatusAsync(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
logger.d(items);
|
|
|
|
// for (var user in searchedChats!) {
|
|
|
|
// for (var user in searchedChats!) {
|
|
|
|
// if (user.id == items.first["id"]) {
|
|
|
|
// if (user.id == items.first["id"]) {
|
|
|
|
// user.userStatus = items.first["userStatus"];
|
|
|
|
// user.userStatus = items.first["userStatus"];
|
|
|
|
@ -308,6 +309,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> onMsgReceived(List<Object?>? parameters) async {
|
|
|
|
Future<void> onMsgReceived(List<Object?>? parameters) async {
|
|
|
|
|
|
|
|
print("msg Received");
|
|
|
|
List<SingleUserChatModel> data = [];
|
|
|
|
List<SingleUserChatModel> data = [];
|
|
|
|
List<SingleUserChatModel> temp = [];
|
|
|
|
List<SingleUserChatModel> temp = [];
|
|
|
|
for (dynamic msg in parameters!) {
|
|
|
|
for (dynamic msg in parameters!) {
|
|
|
|
@ -428,11 +430,10 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
Future<void> sendChatToServer(
|
|
|
|
Future<void> sendChatToServer(
|
|
|
|
{required int chatEventId, required fileTypeId, required int targetUserId, required String targetUserName, required chatReplyId, required bool isAttachment, required bool isReply}) async {
|
|
|
|
{required int chatEventId, required fileTypeId, required int targetUserId, required String targetUserName, required chatReplyId, required bool isAttachment, required bool isReply}) async {
|
|
|
|
Uuid uuid = const Uuid();
|
|
|
|
Uuid uuid = const Uuid();
|
|
|
|
String msg = message.text;
|
|
|
|
|
|
|
|
SingleUserChatModel data = SingleUserChatModel(
|
|
|
|
SingleUserChatModel data = SingleUserChatModel(
|
|
|
|
chatEventId: chatEventId,
|
|
|
|
chatEventId: chatEventId,
|
|
|
|
chatSource: 1,
|
|
|
|
chatSource: 1,
|
|
|
|
contant: msg,
|
|
|
|
contant: message.text,
|
|
|
|
contantNo: uuid.v4(),
|
|
|
|
contantNo: uuid.v4(),
|
|
|
|
conversationId: uuid.v4(),
|
|
|
|
conversationId: uuid.v4(),
|
|
|
|
createdDate: DateTime.now(),
|
|
|
|
createdDate: DateTime.now(),
|
|
|
|
|