|
|
|
@ -660,48 +660,6 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
sFileType = "";
|
|
|
|
sFileType = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// void scrollListener() {
|
|
|
|
|
|
|
|
// _firstAutoscrollExecuted = true;
|
|
|
|
|
|
|
|
// if (scrollController.hasClients && scrollController.position.pixels == scrollController.position.maxScrollExtent) {
|
|
|
|
|
|
|
|
// _shouldAutoscroll = true;
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// _shouldAutoscroll = false;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// void scrollToBottom() {
|
|
|
|
|
|
|
|
// scrollController.animateTo(
|
|
|
|
|
|
|
|
// scrollController.position.maxScrollExtent + 100,
|
|
|
|
|
|
|
|
// duration: const Duration(milliseconds: 500),
|
|
|
|
|
|
|
|
// curve: Curves.easeIn,
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void msgScroll() {
|
|
|
|
|
|
|
|
// scrollController.animateTo(
|
|
|
|
|
|
|
|
// // index: 150,
|
|
|
|
|
|
|
|
// duration: Duration(seconds: 2),
|
|
|
|
|
|
|
|
// curve: Curves.easeInOutCubic);
|
|
|
|
|
|
|
|
// scrollController.animateTo(
|
|
|
|
|
|
|
|
// scrollController.position.minScrollExtent - 100,
|
|
|
|
|
|
|
|
// duration: const Duration(milliseconds: 500),
|
|
|
|
|
|
|
|
// curve: Curves.easeIn,
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Future<void> getDownLoadFile(String fileName) async {
|
|
|
|
|
|
|
|
// var data = await ChatApiClient().downloadURL(fileName: "data");
|
|
|
|
|
|
|
|
// Image.memory(data);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// void getUserChatHistoryNotDeliveredAsync({required int userId}) async {
|
|
|
|
|
|
|
|
// try {
|
|
|
|
|
|
|
|
// await hubConnection.invoke("GetUserChatHistoryNotDeliveredAsync", args: [userId]);
|
|
|
|
|
|
|
|
// } finally {
|
|
|
|
|
|
|
|
// hubConnection.off("GetUserChatHistoryNotDeliveredAsync", method: chatNotDelivered);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void getUserImages() async {
|
|
|
|
void getUserImages() async {
|
|
|
|
List<String> emails = [];
|
|
|
|
List<String> emails = [];
|
|
|
|
for (ChatUser element in searchedChats!) {
|
|
|
|
for (ChatUser element in searchedChats!) {
|
|
|
|
@ -714,20 +672,18 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
user.image = uImage.profilePicture ?? "";
|
|
|
|
user.image = uImage.profilePicture ?? "";
|
|
|
|
user.isImageLoading = false;
|
|
|
|
user.isImageLoading = false;
|
|
|
|
user.isImageLoaded = true;
|
|
|
|
user.isImageLoaded = true;
|
|
|
|
notifyListeners();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (ChatUser favUser in favUsersList) {
|
|
|
|
for (ChatUser favUser in favUsersList) {
|
|
|
|
for (ChatUserImageModel uImage in chatImages) {
|
|
|
|
for (ChatUserImageModel uImage in chatImages) {
|
|
|
|
if (favUser.email == uImage.email) {
|
|
|
|
if (favUser.email == uImage.email) {
|
|
|
|
favUser.image = uImage.profilePicture ?? "";
|
|
|
|
favUser.image = uImage.profilePicture ?? "";
|
|
|
|
favUser.isImageLoading = false;
|
|
|
|
favUser.isImageLoading = false;
|
|
|
|
favUser.isImageLoaded = true;
|
|
|
|
favUser.isImageLoaded = true;
|
|
|
|
notifyListeners();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
notifyListeners();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|