Merge pull request #876 from GetStream/thread-fix
fix(llc): thread message deletion
This commit is contained in:
@@ -13,6 +13,10 @@
|
|||||||
- Added `client.enrichUrl` endpoint for enriching URLs with metadata.
|
- Added `client.enrichUrl` endpoint for enriching URLs with metadata.
|
||||||
- Fixed `unreadCount` after removing user from a channel.
|
- 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
|
## 3.3.1
|
||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|||||||
@@ -1730,7 +1730,13 @@ class ChannelClientState {
|
|||||||
if (replyCount == null || replyCount == 0) return;
|
if (replyCount == null || replyCount == 0) return;
|
||||||
|
|
||||||
addMessage(parentMessage.copyWith(replyCount: replyCount - 1));
|
addMessage(parentMessage.copyWith(replyCount: replyCount - 1));
|
||||||
updateThreadInfo(parentId, threads[parentId]!..remove(message));
|
updateThreadInfo(
|
||||||
|
parentId,
|
||||||
|
threads[parentId]!
|
||||||
|
..removeWhere(
|
||||||
|
(e) => e.id == message.id,
|
||||||
|
),
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
// Remove regular message
|
// Remove regular message
|
||||||
final allMessages = [...messages];
|
final allMessages = [...messages];
|
||||||
|
|||||||
Reference in New Issue
Block a user