|
|
@ -82,6 +82,7 @@ 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) {
|
|
|
@ -172,7 +173,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
if (isNewChat) {
|
|
|
|
if (isNewChat) {
|
|
|
|
userChatHistory = [];
|
|
|
|
userChatHistory = [];
|
|
|
|
} else if (loadMore) {
|
|
|
|
} else if (loadMore) {
|
|
|
|
|
|
|
|
Utils.showToast("No More Data To Load");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (loadMore) {
|
|
|
|
if (loadMore) {
|
|
|
@ -1298,7 +1299,6 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
teamMembersList = [];
|
|
|
|
teamMembersList = [];
|
|
|
|
isLoading = true;
|
|
|
|
isLoading = true;
|
|
|
|
if (AppState().getemployeeSubordinatesList.isNotEmpty) {
|
|
|
|
if (AppState().getemployeeSubordinatesList.isNotEmpty) {
|
|
|
|
print("=============== In App State =====================");
|
|
|
|
|
|
|
|
getEmployeeSubordinatesList = AppState().getemployeeSubordinatesList;
|
|
|
|
getEmployeeSubordinatesList = AppState().getemployeeSubordinatesList;
|
|
|
|
for (GetEmployeeSubordinatesList element in getEmployeeSubordinatesList) {
|
|
|
|
for (GetEmployeeSubordinatesList element in getEmployeeSubordinatesList) {
|
|
|
|
if (element.eMPLOYEEEMAILADDRESS != null) {
|
|
|
|
if (element.eMPLOYEEEMAILADDRESS != null) {
|
|
|
@ -1307,7 +1307,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,
|
|
|
@ -1315,8 +1315,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!),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1326,14 +1326,13 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates("", "", "");
|
|
|
|
getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates("", "", "");
|
|
|
|
AppState().setemployeeSubordinatesList = getEmployeeSubordinatesList;
|
|
|
|
AppState().setemployeeSubordinatesList = getEmployeeSubordinatesList;
|
|
|
|
for (GetEmployeeSubordinatesList element in getEmployeeSubordinatesList) {
|
|
|
|
for (GetEmployeeSubordinatesList element in getEmployeeSubordinatesList) {
|
|
|
|
print(element.eMPLOYEEEMAILADDRESS);
|
|
|
|
|
|
|
|
if (element.eMPLOYEEEMAILADDRESS != null) {
|
|
|
|
if (element.eMPLOYEEEMAILADDRESS != null) {
|
|
|
|
if (element.eMPLOYEEEMAILADDRESS!.isNotEmpty) {
|
|
|
|
if (element.eMPLOYEEEMAILADDRESS!.isNotEmpty) {
|
|
|
|
teamMembersList.add(
|
|
|
|
teamMembersList.add(
|
|
|
|
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,
|
|
|
@ -1341,8 +1340,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!),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|