fix: thread message deletion

This commit is contained in:
Deven Joshi
2022-02-01 10:31:28 +01:00
committed by Salvatore Giordano
parent 03bd2e11c9
commit c80957ebae
2 changed files with 11 additions and 1 deletions
+4
View File
@@ -19,6 +19,10 @@
- Fixed `unreadCount` after removing user from a channel.
- Added `client.queryBannedUsers`, `channel.queryBannedUsers` endpoint for querying banned users.
🐞 Fixed
- [[#871]](https://github.com/GetStream/stream-chat-flutter/issues/871) Fixed thread message deletion.
## 3.3.1
🐞 Fixed
@@ -1827,7 +1827,13 @@ class ChannelClientState {
if (replyCount == null || replyCount == 0) return;
addMessage(parentMessage.copyWith(replyCount: replyCount - 1));
updateThreadInfo(parentId, threads[parentId]!..remove(message));
updateThreadInfo(
parentId,
threads[parentId]!
..removeWhere(
(e) => e.id == message.id,
),
);
} else {
// Remove regular message
final allMessages = [...messages];