From 8d48ebf8640efa42a8da216791a5f799ccfe1a32 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Fri, 11 Jun 2021 15:23:41 +0200 Subject: [PATCH] refactor(ChatLayout): use StatusQ layout component to lay out view These changes don't cause a visual change, but just make use of the two panel layout component providedby StatusQ. Closes #2688 --- ui/app/AppLayouts/Chat/ChatLayout.qml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ui/app/AppLayouts/Chat/ChatLayout.qml b/ui/app/AppLayouts/Chat/ChatLayout.qml index 3cd93e880c..d354d803a0 100644 --- a/ui/app/AppLayouts/Chat/ChatLayout.qml +++ b/ui/app/AppLayouts/Chat/ChatLayout.qml @@ -7,9 +7,10 @@ import "../../../shared/status" import "." import "components" -SplitView { +import StatusQ.Layout 0.1 + +StatusAppTwoPanelLayout { id: chatView - handle: SplitViewHandle {} property alias chatColumn: chatColumn property bool stickersLoaded: false @@ -27,12 +28,19 @@ SplitView { chatColumn.onActivated() } - Loader { + leftPanel: Loader { id: contactColumnLoader - SplitView.preferredWidth: Style.current.leftTabPreferredSize + anchors.fill: parent + anchors.horizontalCenter: parent.horizontalCenter sourceComponent: appSettings.communitiesEnabled && chatsModel.communities.activeCommunity.active ? communtiyColumnComponent : contactsColumnComponent } + rightPanel: ChatColumn { + id: chatColumn + anchors.fill: parent + chatGroupsListViewCount: contactColumnLoader.item.chatGroupsListViewCount + } + Component { id: contactsColumnComponent ContactsColumn { @@ -53,11 +61,6 @@ SplitView { } } - ChatColumn { - id: chatColumn - chatGroupsListViewCount: contactColumnLoader.item.chatGroupsListViewCount - } - Component { id: statusStickerPackClickPopup StatusStickerPackClickPopup{