Lazy load room drawer by putting it in a Loader

This commit is contained in:
Carl Schwan
2021-04-25 23:12:13 +02:00
parent fefcbbe190
commit 7e778d225b

View File

@@ -26,8 +26,11 @@ Kirigami.OverlayDrawer {
leftPadding: 0 leftPadding: 0
rightPadding: 0 rightPadding: 0
Kirigami.Theme.colorSet: Kirigami.Theme.View Kirigami.Theme.colorSet: Kirigami.Theme.View
contentItem: ColumnLayout { contentItem: Loader {
active: roomDrawer.drawerOpen
sourceComponent: ColumnLayout {
id: columnLayout id: columnLayout
anchors.fill: parent
spacing: 0 spacing: 0
Kirigami.AbstractApplicationHeader { Kirigami.AbstractApplicationHeader {
Layout.fillWidth: true Layout.fillWidth: true
@@ -242,6 +245,7 @@ Kirigami.OverlayDrawer {
} }
} }
} }
}
onRoomChanged: { onRoomChanged: {
if (room == null) { if (room == null) {