fix(llc): Fix Channel.removeMessage not able to remove thread message. (#1294)
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
## Upcoming
|
||||||
|
|
||||||
|
🐞 Fixed
|
||||||
|
|
||||||
|
- Fix `Channel.removeMessage` not able to remove thread message.
|
||||||
|
|
||||||
## 4.4.1
|
## 4.4.1
|
||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|||||||
@@ -1955,11 +1955,13 @@ class ChannelClientState {
|
|||||||
// Early return in case the thread is not available
|
// Early return in case the thread is not available
|
||||||
if (!newThreads.containsKey(parentId)) return;
|
if (!newThreads.containsKey(parentId)) return;
|
||||||
|
|
||||||
_threads = newThreads
|
// Remove thread message shown in thread page.
|
||||||
..update(
|
newThreads.update(
|
||||||
parentId,
|
parentId,
|
||||||
(messages) => messages..removeWhere((e) => e.id == message.id),
|
(messages) => [...messages.where((e) => e.id != message.id)],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_threads = newThreads;
|
||||||
|
|
||||||
// Early return if the thread message is not shown in channel.
|
// Early return if the thread message is not shown in channel.
|
||||||
if (message.showInChannel == false) return;
|
if (message.showInChannel == false) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user