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
@@ -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];