|
|
|
@ -82,7 +82,6 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> buildHubConnection() async {
|
|
|
|
Future<void> buildHubConnection() async {
|
|
|
|
|
|
|
|
|
|
|
|
chatHubConnection = await getHubConnection();
|
|
|
|
chatHubConnection = await getHubConnection();
|
|
|
|
await chatHubConnection.start();
|
|
|
|
await chatHubConnection.start();
|
|
|
|
if (kDebugMode) {
|
|
|
|
if (kDebugMode) {
|
|
|
|
@ -1265,7 +1264,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
await Directory(dirPath).create();
|
|
|
|
await Directory(dirPath).create();
|
|
|
|
await File('$dirPath/.nomedia').create();
|
|
|
|
await File('$dirPath/.nomedia').create();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
File file = File("$dirPath/${data.currentUserId}-${data.targetUserId}-${DateTime.now().microsecondsSinceEpoch}." + ext);
|
|
|
|
File file = File("$dirPath/${data.currentUserId}-${data.targetUserId}-${DateTime.now().microsecondsSinceEpoch}" + ext);
|
|
|
|
await file.writeAsBytes(bytes);
|
|
|
|
await file.writeAsBytes(bytes);
|
|
|
|
return file.path;
|
|
|
|
return file.path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1297,7 +1296,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
ChatUser(
|
|
|
|
ChatUser(
|
|
|
|
id: int.parse(element.eMPLOYEENUMBER!),
|
|
|
|
id: int.parse(element.eMPLOYEENUMBER!),
|
|
|
|
email: element.eMPLOYEEEMAILADDRESS,
|
|
|
|
email: element.eMPLOYEEEMAILADDRESS,
|
|
|
|
userName: element.eMPLOYEEDISPLAYNAME,
|
|
|
|
userName: element.eMPLOYEENAME,
|
|
|
|
phone: element.eMPLOYEEMOBILENUMBER,
|
|
|
|
phone: element.eMPLOYEEMOBILENUMBER,
|
|
|
|
userStatus: 0,
|
|
|
|
userStatus: 0,
|
|
|
|
unreadMessageCount: 0,
|
|
|
|
unreadMessageCount: 0,
|
|
|
|
@ -1305,8 +1304,8 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
isTyping: false,
|
|
|
|
isTyping: false,
|
|
|
|
isImageLoading: false,
|
|
|
|
isImageLoading: false,
|
|
|
|
image: element.eMPLOYEEIMAGE ?? "",
|
|
|
|
image: element.eMPLOYEEIMAGE ?? "",
|
|
|
|
isImageLoaded: true,
|
|
|
|
isImageLoaded: element.eMPLOYEEIMAGE == null ? false : true,
|
|
|
|
userLocalDownlaodedImage: await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
|
|
|
|
userLocalDownlaodedImage:element.eMPLOYEEIMAGE == null ? null : await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1319,7 +1318,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
ChatUser(
|
|
|
|
ChatUser(
|
|
|
|
id: int.parse(element.eMPLOYEENUMBER!),
|
|
|
|
id: int.parse(element.eMPLOYEENUMBER!),
|
|
|
|
email: element.eMPLOYEEEMAILADDRESS,
|
|
|
|
email: element.eMPLOYEEEMAILADDRESS,
|
|
|
|
userName: element.eMPLOYEEDISPLAYNAME,
|
|
|
|
userName: element.eMPLOYEENAME,
|
|
|
|
phone: element.eMPLOYEEMOBILENUMBER,
|
|
|
|
phone: element.eMPLOYEEMOBILENUMBER,
|
|
|
|
userStatus: 0,
|
|
|
|
userStatus: 0,
|
|
|
|
unreadMessageCount: 0,
|
|
|
|
unreadMessageCount: 0,
|
|
|
|
@ -1327,8 +1326,8 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
isTyping: false,
|
|
|
|
isTyping: false,
|
|
|
|
isImageLoading: false,
|
|
|
|
isImageLoading: false,
|
|
|
|
image: element.eMPLOYEEIMAGE ?? "",
|
|
|
|
image: element.eMPLOYEEIMAGE ?? "",
|
|
|
|
isImageLoaded: true,
|
|
|
|
isImageLoaded: element.eMPLOYEEIMAGE == null ? false : true,
|
|
|
|
userLocalDownlaodedImage: await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
|
|
|
|
userLocalDownlaodedImage: element.eMPLOYEEIMAGE == null ? null : await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|