Always open the user details dialog in the focused window
This fixes some odd UX where you tap on someone's user in a search or pinned messages window, but it opens in the NeoChat main window instead. Fixes #681
This commit is contained in:
@@ -325,11 +325,13 @@ Kirigami.ApplicationWindow {
|
||||
})
|
||||
}
|
||||
function showUserDetail(user, room) {
|
||||
Qt.createComponent("org.kde.neochat", "UserDetailDialog").createObject(root.QQC2.ApplicationWindow.window, {
|
||||
const dialog = Qt.createComponent("org.kde.neochat", "UserDetailDialog").createObject(root, {
|
||||
room: room,
|
||||
user: user,
|
||||
connection: root.connection
|
||||
}).open();
|
||||
connection: root.connection,
|
||||
});
|
||||
dialog.parent = QmlUtils.focusedWindowItem(); // Kirigami Dialogs overwrite the parent, so we need to set it again
|
||||
dialog.open();
|
||||
}
|
||||
|
||||
function load() {
|
||||
|
||||
Reference in New Issue
Block a user