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