From 5d9556722f409c9202c0b506dd789b7d2d722b01 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Sat, 17 Jul 2021 16:16:18 -0400 Subject: [PATCH] Fix up components --- resources/qml/Root.qml | 49 ++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/resources/qml/Root.qml b/resources/qml/Root.qml index ecd0bdb7..3825fb89 100644 --- a/resources/qml/Root.qml +++ b/resources/qml/Root.qml @@ -47,6 +47,13 @@ Page { } + Component { + id: roomMembersComponent + + RoomMembers { + } + } + Component { id: mobileCallInviteDialog @@ -63,6 +70,20 @@ Page { } + Component { + id: deviceVerificationDialog + + DeviceVerification { + } + + } + Component { + id: inviteDialog + + InviteDialog { + } + } + Shortcut { sequence: "Ctrl+K" onActivated: { @@ -82,20 +103,6 @@ Page { onActivated: Rooms.previousRoom() } - Component { - id: deviceVerificationDialog - - DeviceVerification { - } - - } - Component { - id: inviteDialog - - InviteDialog { - } - } - Connections { target: TimelineManager onNewDeviceVerificationRequest: { @@ -123,18 +130,18 @@ Page { } Connections { - target: TimelineManager.timeline + target: Rooms.currentRoom onOpenRoomMembersDialog: { var membersDialog = roomMembersComponent.createObject(timelineRoot, { "members": members, - "roomName": TimelineManager.timeline.roomName + "roomName": Rooms.currentRoom.roomName }); membersDialog.show(); } } Connections { - target: TimelineManager.timeline + target: Rooms.currentRoom onOpenRoomSettingsDialog: { var roomSettings = roomSettingsComponent.createObject(timelineRoot, { "roomSettings": settings @@ -144,12 +151,12 @@ Page { } Connections { - target: TimelineManager.timeline + target: Rooms.currentRoom onOpenInviteUsersDialog: { var dialog = inviteDialog.createObject(timelineRoot, { - "roomId": TimelineManager.timeline.roomId, - "roomName": TimelineManager.timeline.roomName - }); + "roomId": Rooms.currentRoom.roomId, + "roomName": Rooms.currentRoom.roomName + }); dialog.show(); } }