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
This commit is contained in:
Pascal Precht 2021-06-11 15:23:41 +02:00 committed by Pascal Precht
parent f581f49dcf
commit 8d48ebf864
1 changed files with 12 additions and 9 deletions

View File

@ -7,9 +7,10 @@ import "../../../shared/status"
import "." import "."
import "components" import "components"
SplitView { import StatusQ.Layout 0.1
StatusAppTwoPanelLayout {
id: chatView id: chatView
handle: SplitViewHandle {}
property alias chatColumn: chatColumn property alias chatColumn: chatColumn
property bool stickersLoaded: false property bool stickersLoaded: false
@ -27,12 +28,19 @@ SplitView {
chatColumn.onActivated() chatColumn.onActivated()
} }
Loader { leftPanel: Loader {
id: contactColumnLoader id: contactColumnLoader
SplitView.preferredWidth: Style.current.leftTabPreferredSize anchors.fill: parent
anchors.horizontalCenter: parent.horizontalCenter
sourceComponent: appSettings.communitiesEnabled && chatsModel.communities.activeCommunity.active ? communtiyColumnComponent : contactsColumnComponent sourceComponent: appSettings.communitiesEnabled && chatsModel.communities.activeCommunity.active ? communtiyColumnComponent : contactsColumnComponent
} }
rightPanel: ChatColumn {
id: chatColumn
anchors.fill: parent
chatGroupsListViewCount: contactColumnLoader.item.chatGroupsListViewCount
}
Component { Component {
id: contactsColumnComponent id: contactsColumnComponent
ContactsColumn { ContactsColumn {
@ -53,11 +61,6 @@ SplitView {
} }
} }
ChatColumn {
id: chatColumn
chatGroupsListViewCount: contactColumnLoader.item.chatGroupsListViewCount
}
Component { Component {
id: statusStickerPackClickPopup id: statusStickerPackClickPopup
StatusStickerPackClickPopup{ StatusStickerPackClickPopup{