Improve Room Drawer

This fix the bug of it not getting the right data and improve the look
signically.
This commit is contained in:
Carl Schwan
2020-11-16 14:27:44 +01:00
parent 6db8354727
commit eba4d874df
2 changed files with 161 additions and 159 deletions

View File

@@ -15,7 +15,6 @@ import NeoChat.Component 1.0
import NeoChat.Panel 1.0
import NeoChat.Dialog 1.0
import NeoChat.Page 1.0
import NeoChat.Page 1.0
Kirigami.ApplicationWindow {
id: root
@@ -24,7 +23,7 @@ Kirigami.ApplicationWindow {
/**
* Manage opening and close rooms
*/
Item {
QtObject {
id: roomManager
property var currentRoom: null
@@ -43,18 +42,12 @@ Kirigami.ApplicationWindow {
pageStack.push(roomPage, { 'currentRoom': room, });
currentRoom = room;
}
Component {
id: roomPage
RoomPage {}
}
}
contextDrawer: RoomDrawer {
id: contextDrawer
enabled: root.currentRoomm !== null
room: root.currentRoom
enabled: roomManager.hasOpenRoom
room: roomManager.currentRoom
handleVisible: enabled && (pageStack.currentItem instanceof RoomPage)
}
@@ -130,4 +123,10 @@ Kirigami.ApplicationWindow {
connection: Controller.activeConnection
}
Component {
id: roomPage
RoomPage {}
}
}