mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-19 10:53:51 +02:00
fix: unread chats bug
This commit is contained in:
parent
d870b8424b
commit
d0933ac252
7 changed files with 16 additions and 12 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
## 0.4.2 - November 24 2023
|
||||||
|
|
||||||
|
- Fix groupchats seen as personal chat when there are unread messages
|
||||||
|
|
||||||
## 0.4.1 - November 22 2023
|
## 0.4.1 - November 22 2023
|
||||||
|
|
||||||
- Add groupName for groupchat avatarbuilder
|
- Add groupName for groupchat avatarbuilder
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
name: flutter_community_chat
|
name: flutter_community_chat
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 0.4.1
|
version: 0.4.2
|
||||||
|
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
|
@ -19,12 +19,12 @@ dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||||
path: packages/flutter_community_chat_view
|
path: packages/flutter_community_chat_view
|
||||||
ref: 0.4.1
|
ref: 0.4.2
|
||||||
flutter_community_chat_interface:
|
flutter_community_chat_interface:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||||
path: packages/flutter_community_chat_interface
|
path: packages/flutter_community_chat_interface
|
||||||
ref: 0.4.1
|
ref: 0.4.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_lints: ^2.0.0
|
flutter_lints: ^2.0.0
|
||||||
|
|
|
@ -289,7 +289,7 @@ class FirebaseChatService implements ChatService {
|
||||||
.doc(chatId)
|
.doc(chatId)
|
||||||
.get();
|
.get();
|
||||||
|
|
||||||
if (chatCollection.exists) {
|
if (chatCollection.exists && chatCollection.data()?['users'] != null) {
|
||||||
var otherUser = chatCollection.data()?['users'].firstWhere(
|
var otherUser = chatCollection.data()?['users'].firstWhere(
|
||||||
(element) => element != currentUser?.id,
|
(element) => element != currentUser?.id,
|
||||||
);
|
);
|
||||||
|
@ -317,7 +317,7 @@ class FirebaseChatService implements ChatService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return GroupChatModel(
|
return GroupChatModel(
|
||||||
id: chat?.id ?? '',
|
id: chat?.id ?? chatId,
|
||||||
title: chat?.title ?? '',
|
title: chat?.title ?? '',
|
||||||
imageUrl: chat?.imageUrl ?? '',
|
imageUrl: chat?.imageUrl ?? '',
|
||||||
users: users,
|
users: users,
|
||||||
|
@ -376,7 +376,7 @@ class FirebaseChatService implements ChatService {
|
||||||
return chat;
|
return chat;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> userIds = [
|
var userIds = <String>[
|
||||||
currentUser!.id!,
|
currentUser!.id!,
|
||||||
chat.user.id!,
|
chat.user.id!,
|
||||||
];
|
];
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
name: flutter_community_chat_firebase
|
name: flutter_community_chat_firebase
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 0.4.1
|
version: 0.4.2
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
@ -23,7 +23,7 @@ dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||||
path: packages/flutter_community_chat_interface
|
path: packages/flutter_community_chat_interface
|
||||||
ref: 0.4.1
|
ref: 0.4.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_lints: ^2.0.0
|
flutter_lints: ^2.0.0
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
name: flutter_community_chat_interface
|
name: flutter_community_chat_interface
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 0.4.1
|
version: 0.4.2
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -18,7 +18,7 @@ dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||||
path: packages/flutter_community_chat_view
|
path: packages/flutter_community_chat_view
|
||||||
ref: 0.4.1
|
ref: 0.4.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
name: flutter_community_chat_view
|
name: flutter_community_chat_view
|
||||||
description: A standard flutter package.
|
description: A standard flutter package.
|
||||||
version: 0.4.1
|
version: 0.4.2
|
||||||
|
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||||
path: packages/flutter_community_chat_interface
|
path: packages/flutter_community_chat_interface
|
||||||
ref: 0.4.1
|
ref: 0.4.2
|
||||||
cached_network_image: ^3.2.2
|
cached_network_image: ^3.2.2
|
||||||
flutter_image_picker:
|
flutter_image_picker:
|
||||||
git:
|
git:
|
||||||
|
|
Loading…
Reference in a new issue