diff --git a/src/app/chat/views/channel.nim b/src/app/chat/views/channel.nim index d993e29408..44e28cb50e 100644 --- a/src/app/chat/views/channel.nim +++ b/src/app/chat/views/channel.nim @@ -305,12 +305,6 @@ QtObject: if (selectedChannel == nil): return false result = selectedChannel.muted - proc getChatItemById*(self: ChannelView, id: string): QObject {.slot.} = - let chat = self.getChannelById(id) - let chatItemView = newChatItemView(self.status) - chatItemView.setChatItem(chat) - return chatItemView - proc removeChat*(self: ChannelView, chatId: string) = discard self.chats.removeChatItemFromList(chatId) self.setActiveChannel(backToFirstChat) diff --git a/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml b/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml index 3401daa7a5..b7f62931bd 100644 --- a/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/CommunityColumnView.qml @@ -228,9 +228,12 @@ Item { } chatListPopupMenu: ChatContextMenuView { + id: chatContextMenuView store: root.store openHandler: function (id) { - chatItem = root.store.chatsModelInst.channelView.getChatItemById(id) + root.store.chatsModelInst.channelView.setContextChannel(id) + chatContextMenuView.chatItem = root.store.chatsModelInst.channelView.contextChannel + } } } diff --git a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml index fbe9c1a86f..f677d67dee 100644 --- a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml @@ -259,9 +259,11 @@ Item { onChatItemUnmuted: root.store.chatsModelInst.channelView.unmuteChatItem(id) popupMenu: ChatContextMenuView { + id: chatContextMenuView store: root.store openHandler: function (id) { - chatItem = root.store.chatsModelInst.channelView.getChatItemById(id) + root.store.chatsModelInst.channelView.setContextChannel(id) + chatContextMenuView.chatItem = root.store.chatsModelInst.channelView.contextChannel } } }