Merge pull request #876 from GetStream/thread-fix

fix(llc): thread message deletion
This commit is contained in:
Salvatore Giordano
2022-01-31 14:51:36 +01:00
committed by GitHub
2 changed files with 11 additions and 1 deletions
+4
View File
@@ -13,6 +13,10 @@
- Added `client.enrichUrl` endpoint for enriching URLs with metadata.
- Fixed `unreadCount` after removing user from a channel.
🐞 Fixed
- [[#871]](https://github.com/GetStream/stream-chat-flutter/issues/871) Fixed thread message deletion.
## 3.3.1
🐞 Fixed
@@ -1730,7 +1730,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];