Fix up components

pull/595/head
Loren Burkholder 4 years ago
parent 4ddcff2300
commit 5d9556722f
  1. 49
      resources/qml/Root.qml

@ -47,6 +47,13 @@ Page {
} }
Component {
id: roomMembersComponent
RoomMembers {
}
}
Component { Component {
id: mobileCallInviteDialog id: mobileCallInviteDialog
@ -63,6 +70,20 @@ Page {
} }
Component {
id: deviceVerificationDialog
DeviceVerification {
}
}
Component {
id: inviteDialog
InviteDialog {
}
}
Shortcut { Shortcut {
sequence: "Ctrl+K" sequence: "Ctrl+K"
onActivated: { onActivated: {
@ -82,20 +103,6 @@ Page {
onActivated: Rooms.previousRoom() onActivated: Rooms.previousRoom()
} }
Component {
id: deviceVerificationDialog
DeviceVerification {
}
}
Component {
id: inviteDialog
InviteDialog {
}
}
Connections { Connections {
target: TimelineManager target: TimelineManager
onNewDeviceVerificationRequest: { onNewDeviceVerificationRequest: {
@ -123,18 +130,18 @@ Page {
} }
Connections { Connections {
target: TimelineManager.timeline target: Rooms.currentRoom
onOpenRoomMembersDialog: { onOpenRoomMembersDialog: {
var membersDialog = roomMembersComponent.createObject(timelineRoot, { var membersDialog = roomMembersComponent.createObject(timelineRoot, {
"members": members, "members": members,
"roomName": TimelineManager.timeline.roomName "roomName": Rooms.currentRoom.roomName
}); });
membersDialog.show(); membersDialog.show();
} }
} }
Connections { Connections {
target: TimelineManager.timeline target: Rooms.currentRoom
onOpenRoomSettingsDialog: { onOpenRoomSettingsDialog: {
var roomSettings = roomSettingsComponent.createObject(timelineRoot, { var roomSettings = roomSettingsComponent.createObject(timelineRoot, {
"roomSettings": settings "roomSettings": settings
@ -144,12 +151,12 @@ Page {
} }
Connections { Connections {
target: TimelineManager.timeline target: Rooms.currentRoom
onOpenInviteUsersDialog: { onOpenInviteUsersDialog: {
var dialog = inviteDialog.createObject(timelineRoot, { var dialog = inviteDialog.createObject(timelineRoot, {
"roomId": TimelineManager.timeline.roomId, "roomId": Rooms.currentRoom.roomId,
"roomName": TimelineManager.timeline.roomName "roomName": Rooms.currentRoom.roomName
}); });
dialog.show(); dialog.show();
} }
} }

Loading…
Cancel
Save