From 28e9b6da27f31f8fcc18aa3c8e1aae90b94abc3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Thu, 10 Oct 2024 17:32:18 +0200 Subject: [PATCH] fix(CommunityMemberMessagesPopup): fix displaying of messages - fix a refactoring bug in the stores - disable the context menu since it's not really usefull and we're still missing like a dozen of stores needed for MessageView anyway --- .../Communities/popups/CommunityMemberMessagesPopup.qml | 5 ++--- ui/app/mainui/Popups.qml | 2 +- ui/imports/shared/views/chat/MessageView.qml | 5 ++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/app/AppLayouts/Communities/popups/CommunityMemberMessagesPopup.qml b/ui/app/AppLayouts/Communities/popups/CommunityMemberMessagesPopup.qml index 6ce8465d47..a23caeb21a 100644 --- a/ui/app/AppLayouts/Communities/popups/CommunityMemberMessagesPopup.qml +++ b/ui/app/AppLayouts/Communities/popups/CommunityMemberMessagesPopup.qml @@ -65,10 +65,9 @@ StatusDialog { width: parent.width sharedRootStore: root.sharedRootStore - rootStore: root.store + rootStore: root.rootStore chatCommunitySectionModule: root.chatCommunitySectionModule - messageStore: root.memberMessagesModel - + messageStore: root.rootStore.messageStore messageId: model.id chatId: model.chatId responseToMessageWithId: model.responseToMessageWithId diff --git a/ui/app/mainui/Popups.qml b/ui/app/mainui/Popups.qml index 0d29238e7d..5cd07f7bdb 100644 --- a/ui/app/mainui/Popups.qml +++ b/ui/app/mainui/Popups.qml @@ -391,7 +391,7 @@ QtObject { function openCommunityMemberMessagesPopup(store, chatCommunitySectionModule, memberPubKey, displayName) { openPopup(communityMemberMessagesPopup, { - store: store, + rootStore: store, chatCommunitySectionModule: chatCommunitySectionModule, memberPubKey: memberPubKey, displayName: displayName diff --git a/ui/imports/shared/views/chat/MessageView.qml b/ui/imports/shared/views/chat/MessageView.qml index 20bbb61954..81d6d9fe2b 100644 --- a/ui/imports/shared/views/chat/MessageView.qml +++ b/ui/imports/shared/views/chat/MessageView.qml @@ -152,6 +152,9 @@ Loader { || messageContentType === Constants.messageContentType.communityInviteType || messageContentType === Constants.messageContentType.transactionType function openProfileContextMenu(sender, mouse, isReply = false) { + if (isViewMemberMessagesePopup) + return false + if (isReply && !quotedMessageFrom) { // The responseTo message was deleted // so we don't enable to right click the unavailable profile @@ -174,7 +177,7 @@ Loader { } function openMessageContextMenu() { - if (placeholderMessage || !root.rootStore.mainModuleInst.activeSection.joined) + if (isViewMemberMessagesePopup || placeholderMessage || !root.rootStore.mainModuleInst.activeSection.joined) return const params = {