mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-18 18:33:49 +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
|
||||
|
||||
- Add groupName for groupchat avatarbuilder
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name: flutter_community_chat
|
||||
description: A new Flutter package project.
|
||||
version: 0.4.1
|
||||
version: 0.4.2
|
||||
|
||||
publish_to: none
|
||||
|
||||
|
@ -19,12 +19,12 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||
path: packages/flutter_community_chat_view
|
||||
ref: 0.4.1
|
||||
ref: 0.4.2
|
||||
flutter_community_chat_interface:
|
||||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||
path: packages/flutter_community_chat_interface
|
||||
ref: 0.4.1
|
||||
ref: 0.4.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^2.0.0
|
||||
|
|
|
@ -289,7 +289,7 @@ class FirebaseChatService implements ChatService {
|
|||
.doc(chatId)
|
||||
.get();
|
||||
|
||||
if (chatCollection.exists) {
|
||||
if (chatCollection.exists && chatCollection.data()?['users'] != null) {
|
||||
var otherUser = chatCollection.data()?['users'].firstWhere(
|
||||
(element) => element != currentUser?.id,
|
||||
);
|
||||
|
@ -317,7 +317,7 @@ class FirebaseChatService implements ChatService {
|
|||
}
|
||||
}
|
||||
return GroupChatModel(
|
||||
id: chat?.id ?? '',
|
||||
id: chat?.id ?? chatId,
|
||||
title: chat?.title ?? '',
|
||||
imageUrl: chat?.imageUrl ?? '',
|
||||
users: users,
|
||||
|
@ -376,7 +376,7 @@ class FirebaseChatService implements ChatService {
|
|||
return chat;
|
||||
}
|
||||
|
||||
List<String> userIds = [
|
||||
var userIds = <String>[
|
||||
currentUser!.id!,
|
||||
chat.user.id!,
|
||||
];
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name: flutter_community_chat_firebase
|
||||
description: A new Flutter package project.
|
||||
version: 0.4.1
|
||||
version: 0.4.2
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
|
@ -23,7 +23,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||
path: packages/flutter_community_chat_interface
|
||||
ref: 0.4.1
|
||||
ref: 0.4.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^2.0.0
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name: flutter_community_chat_interface
|
||||
description: A new Flutter package project.
|
||||
version: 0.4.1
|
||||
version: 0.4.2
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
|
|
|
@ -18,7 +18,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||
path: packages/flutter_community_chat_view
|
||||
ref: 0.4.1
|
||||
ref: 0.4.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name: flutter_community_chat_view
|
||||
description: A standard flutter package.
|
||||
version: 0.4.1
|
||||
version: 0.4.2
|
||||
|
||||
publish_to: none
|
||||
|
||||
|
@ -20,7 +20,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||
path: packages/flutter_community_chat_interface
|
||||
ref: 0.4.1
|
||||
ref: 0.4.2
|
||||
cached_network_image: ^3.2.2
|
||||
flutter_image_picker:
|
||||
git:
|
||||
|
|
Loading…
Reference in a new issue