|
|
|
@ -330,6 +330,8 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
user.userStatus = items.first["userStatus"];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
notifyListeners();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1292,45 +1294,52 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
print("=============== In App State =====================");
|
|
|
|
|
getEmployeeSubordinatesList = AppState().getemployeeSubordinatesList;
|
|
|
|
|
for (GetEmployeeSubordinatesList element in getEmployeeSubordinatesList) {
|
|
|
|
|
print(element.eMPLOYEEEMAILADDRESS);
|
|
|
|
|
teamMembersList.add(
|
|
|
|
|
ChatUser(
|
|
|
|
|
id: int.parse(element.eMPLOYEENUMBER!),
|
|
|
|
|
email: element.eMPLOYEEEMAILADDRESS,
|
|
|
|
|
userName: element.eMPLOYEEDISPLAYNAME,
|
|
|
|
|
phone: element.eMPLOYEEMOBILENUMBER,
|
|
|
|
|
userStatus: 0,
|
|
|
|
|
unreadMessageCount: 0,
|
|
|
|
|
isFav: false,
|
|
|
|
|
isTyping: false,
|
|
|
|
|
isImageLoading: false,
|
|
|
|
|
image: element.eMPLOYEEIMAGE ?? "",
|
|
|
|
|
isImageLoaded: true,
|
|
|
|
|
userLocalDownlaodedImage: await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
if (element.eMPLOYEEEMAILADDRESS != null) {
|
|
|
|
|
if (element.eMPLOYEEEMAILADDRESS!.isNotEmpty) {
|
|
|
|
|
teamMembersList.add(
|
|
|
|
|
ChatUser(
|
|
|
|
|
id: int.parse(element.eMPLOYEENUMBER!),
|
|
|
|
|
email: element.eMPLOYEEEMAILADDRESS,
|
|
|
|
|
userName: element.eMPLOYEEDISPLAYNAME,
|
|
|
|
|
phone: element.eMPLOYEEMOBILENUMBER,
|
|
|
|
|
userStatus: 0,
|
|
|
|
|
unreadMessageCount: 0,
|
|
|
|
|
isFav: false,
|
|
|
|
|
isTyping: false,
|
|
|
|
|
isImageLoading: false,
|
|
|
|
|
image: element.eMPLOYEEIMAGE ?? "",
|
|
|
|
|
isImageLoaded: true,
|
|
|
|
|
userLocalDownlaodedImage: await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates("", "", "");
|
|
|
|
|
AppState().setemployeeSubordinatesList = getEmployeeSubordinatesList;
|
|
|
|
|
for (GetEmployeeSubordinatesList element in getEmployeeSubordinatesList) {
|
|
|
|
|
print(element.eMPLOYEEEMAILADDRESS);
|
|
|
|
|
teamMembersList.add(
|
|
|
|
|
ChatUser(
|
|
|
|
|
id: int.parse(element.eMPLOYEENUMBER!),
|
|
|
|
|
email: element.eMPLOYEEEMAILADDRESS,
|
|
|
|
|
userName: element.eMPLOYEEDISPLAYNAME,
|
|
|
|
|
phone: element.eMPLOYEEMOBILENUMBER,
|
|
|
|
|
userStatus: 0,
|
|
|
|
|
unreadMessageCount: 0,
|
|
|
|
|
isFav: false,
|
|
|
|
|
isTyping: false,
|
|
|
|
|
isImageLoading: false,
|
|
|
|
|
image: element.eMPLOYEEIMAGE ?? "",
|
|
|
|
|
isImageLoaded: true,
|
|
|
|
|
userLocalDownlaodedImage: await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
if (element.eMPLOYEEEMAILADDRESS != null) {
|
|
|
|
|
if (element.eMPLOYEEEMAILADDRESS!.isNotEmpty) {
|
|
|
|
|
teamMembersList.add(
|
|
|
|
|
ChatUser(
|
|
|
|
|
id: int.parse(element.eMPLOYEENUMBER!),
|
|
|
|
|
email: element.eMPLOYEEEMAILADDRESS,
|
|
|
|
|
userName: element.eMPLOYEEDISPLAYNAME,
|
|
|
|
|
phone: element.eMPLOYEEMOBILENUMBER,
|
|
|
|
|
userStatus: 0,
|
|
|
|
|
unreadMessageCount: 0,
|
|
|
|
|
isFav: false,
|
|
|
|
|
isTyping: false,
|
|
|
|
|
isImageLoading: false,
|
|
|
|
|
image: element.eMPLOYEEIMAGE ?? "",
|
|
|
|
|
isImageLoaded: true,
|
|
|
|
|
userLocalDownlaodedImage: await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
isLoading = false;
|
|
|
|
|