From b5e8132859216071d3da6900b730df9d3fe6c33f Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Mon, 20 Sep 2021 16:45:12 +0200 Subject: [PATCH] fix(@desktop/chat): blocked user messages disappear after the user is blocked Fixes: #3418 --- ui/app/AppLayouts/Chat/ChatColumn.qml | 3 --- ui/app/AppLayouts/Chat/ChatColumn/Message.qml | 11 ----------- 2 files changed, 14 deletions(-) diff --git a/ui/app/AppLayouts/Chat/ChatColumn.qml b/ui/app/AppLayouts/Chat/ChatColumn.qml index 05fa0193bf..2db3a38ee4 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn.qml @@ -529,9 +529,6 @@ Item { onContactListChanged: { isBlocked = profileModel.contacts.isContactBlocked(activeChatId); } - onContactBlocked: { - chatsModel.messageView.removeMessagesByUserId(publicKey) - } } Connections { diff --git a/ui/app/AppLayouts/Chat/ChatColumn/Message.qml b/ui/app/AppLayouts/Chat/ChatColumn/Message.qml index b7a2040de2..8dc166d33e 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/Message.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/Message.qml @@ -158,17 +158,6 @@ Item { } } - Connections { - target: profileModel.contacts - onContactBlocked: { - // This hack is used because removeMessagesByUserId sometimes does not remove the messages - if(publicKey === fromAuthor){ - root.visible = 0; - root.height = 0; - } - } - } - Connections { target: chatsModel.messageView onHideMessage: {