summary refs log tree commit diff
path: root/resources/qml/ChatPage.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-06-08 22:18:51 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-06-08 22:22:33 +0200
commitd364c29c43dca128f516c5f7d4e925b27347f558 (patch)
treebb590665fc68091fcc62773cc4792d4f4684ea6b /resources/qml/ChatPage.qml
parentSomewhat reenable the adaptive layout (diff)
downloadnheko-d364c29c43dca128f516c5f7d4e925b27347f558.tar.xz
Implement switching in narrow mode
Diffstat (limited to 'resources/qml/ChatPage.qml')
-rw-r--r--resources/qml/ChatPage.qml9
1 files changed, 8 insertions, 1 deletions
diff --git a/resources/qml/ChatPage.qml b/resources/qml/ChatPage.qml
index e5b53738..0f884d75 100644
--- a/resources/qml/ChatPage.qml
+++ b/resources/qml/ChatPage.qml
@@ -14,8 +14,11 @@ Rectangle {
     color: Nheko.colors.window
 
     AdaptiveLayout {
+        id: adaptiveView
+
         anchors.fill: parent
         singlePageMode: width < communityListC.maximumWidth + roomListC.maximumWidth + timlineViewC.minimumWidth
+        pageIndex: Rooms.currentRoom ? 2 : 1
 
         AdaptiveLayoutElement {
             id: communityListC
@@ -37,9 +40,12 @@ Rectangle {
             minimumWidth: Nheko.avatarSize * 5 + Nheko.paddingSmall * 2
             preferredWidth: Nheko.avatarSize * 5 + Nheko.paddingSmall * 2
             maximumWidth: Nheko.avatarSize * 10 + Nheko.paddingSmall * 2
-            collapsedWidth: Nheko.avatarSize + Nheko.paddingSmall * 2
+            collapsedWidth: roomlist.avatarSize + 2 * Nheko.paddingMedium
 
             RoomList {
+                id: roomlist
+
+                collapsed: parent.collapsed
             }
 
         }
@@ -52,6 +58,7 @@ Rectangle {
             TimelineView {
                 id: timeline
 
+                showBackButton: adaptiveView.singlePageMode
                 room: Rooms.currentRoom
             }