diff --git a/ui/app/AppLayouts/Chat/ChatLayout.qml b/ui/app/AppLayouts/Chat/ChatLayout.qml index 2c326cad54..2d53948b55 100644 --- a/ui/app/AppLayouts/Chat/ChatLayout.qml +++ b/ui/app/AppLayouts/Chat/ChatLayout.qml @@ -41,7 +41,9 @@ SplitView { Component { id: communtiyColumnComponent - CommunityColumn {} + CommunityColumn { + pinnedMessagesPopupComponent: chatColumn.pinnedMessagesPopupComponent + } } Component { diff --git a/ui/app/AppLayouts/Chat/CommunityColumn.qml b/ui/app/AppLayouts/Chat/CommunityColumn.qml index 12fef701d1..77e7a5a9e1 100644 --- a/ui/app/AppLayouts/Chat/CommunityColumn.qml +++ b/ui/app/AppLayouts/Chat/CommunityColumn.qml @@ -12,6 +12,7 @@ import "./CommunityComponents" Rectangle { // TODO unhardcode property int chatGroupsListViewCount: channelList.channelListCount + property Component pinnedMessagesPopupComponent id: root Layout.fillHeight: true @@ -20,6 +21,7 @@ Rectangle { Component { id: createChannelPopup CreateChannelPopup { + pinnedMessagesPopupComponent: root.pinnedMessagesPopupComponent onClosed: { destroy() } diff --git a/ui/app/AppLayouts/Chat/CommunityComponents/CreateChannelPopup.qml b/ui/app/AppLayouts/Chat/CommunityComponents/CreateChannelPopup.qml index 0a3855d6e6..cb2c8cea05 100644 --- a/ui/app/AppLayouts/Chat/CommunityComponents/CreateChannelPopup.qml +++ b/ui/app/AppLayouts/Chat/CommunityComponents/CreateChannelPopup.qml @@ -14,6 +14,9 @@ ModalPopup { property string categoryId: "" readonly property int maxDescChars: 140 property string nameValidationError: "" + + property Component pinnedMessagesPopupComponent + property bool isValid: nameInput.isValid && descriptionTextArea.isValid @@ -173,14 +176,6 @@ ModalPopup { // text: qsTrId("by-making-a-channel-private--only-members-with-selected-permission-will-be-able-to-access-it") // } - Component { - id: pinnedMessagesPopupComponent - PinnedMessagesPopup { - id: pinnedMessagesPopup - onClosed: destroy() - } - } - CommunityPopupButton { id: memberBtn label: qsTr("Pinned messages") diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index 60927bec29..6c61d66d55 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -284,6 +284,7 @@ RowLayout { id: editChannelPopup CreateChannelPopup { isEdit: true + pinnedMessagesPopupComponent: chatLayoutContainer.chatColumn.pinnedMessagesPopupComponent onClosed: { destroy() }