Cleanup Main.qml
This commit is contained in:
@@ -107,7 +107,7 @@ Kirigami.ApplicationWindow {
|
||||
target: RoomManager
|
||||
|
||||
function onAskJoinRoom(room) {
|
||||
joinRoomDialog.createObject(applicationWindow(), {
|
||||
Qt.createComponent("org.kde.neochat", "JoinRoomDialog").createObject(applicationWindow(), {
|
||||
room: room,
|
||||
connection: root.connection
|
||||
}).open();
|
||||
@@ -290,12 +290,6 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: keyVerificationDialogComponent
|
||||
KeyVerificationDialog {}
|
||||
}
|
||||
|
||||
|
||||
Connections {
|
||||
target: root.connection
|
||||
|
||||
@@ -303,7 +297,7 @@ Kirigami.ApplicationWindow {
|
||||
RoomManager.resolveResource(directChat.id);
|
||||
}
|
||||
function onNewKeyVerificationSession(session) {
|
||||
applicationWindow().pageStack.pushDialogLayer(keyVerificationDialogComponent, {
|
||||
applicationWindow().pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat", "KeyVerificationDialog"), {
|
||||
session: session
|
||||
}, {
|
||||
title: i18nc("@title:window", "Session Verification")
|
||||
@@ -354,11 +348,6 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: joinRoomDialog
|
||||
JoinRoomDialog {}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: askDirectChatConfirmationComponent
|
||||
|
||||
@@ -449,7 +438,7 @@ Kirigami.ApplicationWindow {
|
||||
})
|
||||
}
|
||||
function showUserDetail(user) {
|
||||
userDetailDialog.createObject(root.QQC2.ApplicationWindow.window, {
|
||||
Qt.createComponent("org.kde.neochat", "UserDetailDialog").createObject(root.QQC2.ApplicationWindow.window, {
|
||||
room: RoomManager.currentRoom ? RoomManager.currentRoom : null,
|
||||
user: RoomManager.currentRoom ? RoomManager.currentRoom.getUser(user.id) : QmlUtils.getUser(user),
|
||||
connection: root.connection
|
||||
@@ -464,9 +453,4 @@ Kirigami.ApplicationWindow {
|
||||
});
|
||||
roomPage.forceActiveFocus();
|
||||
}
|
||||
|
||||
Component {
|
||||
id: userDetailDialog
|
||||
UserDetailDialog {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user