summary refs log tree commit diff
path: root/resources/qml/Root.qml
diff options
context:
space:
mode:
authorMalte E <97891689+maltee1@users.noreply.github.com>2023-02-01 00:59:49 +0800
committerGitHub <noreply@github.com>2023-01-31 16:59:49 +0000
commit5ed3bfc8f82e9123db4c198b6b9701df57c968f4 (patch)
tree9cb27ca2ed00830dba9d8adcc780d1b5296dd7cc /resources/qml/Root.qml
parentMerge pull request #1319 from Decodetalkers/menuhideonwayland (diff)
downloadnheko-5ed3bfc8f82e9123db4c198b6b9701df57c968f4.tar.xz
add user search to invite dialog (#1253)
Diffstat (limited to 'resources/qml/Root.qml')
-rw-r--r--resources/qml/Root.qml10
1 files changed, 9 insertions, 1 deletions
diff --git a/resources/qml/Root.qml b/resources/qml/Root.qml
index 5f7d7229..f60ebac1 100644
--- a/resources/qml/Root.qml
+++ b/resources/qml/Root.qml
@@ -34,6 +34,10 @@ Pane {
         id: publicRooms
     }
 
+    UserDirectoryModel {
+        id: userDirectory
+    }
+
     //Timer {
     //    onTriggered: gc()
     //    interval: 1000
@@ -198,11 +202,15 @@ Pane {
         }
 
         function onOpenInviteUsersDialog(invitees) {
-            var dialog = Qt.createComponent("qrc:/qml/dialogs/InviteDialog.qml").createObject(timelineRoot, {
+            var component = Qt.createComponent("qrc:/qml/dialogs/InviteDialog.qml")
+            var dialog = component.createObject(timelineRoot, {
                 "roomId": Rooms.currentRoom.roomId,
                 "plainRoomName": Rooms.currentRoom.plainRoomName,
                 "invitees": invitees
             });
+            if (component.status != Component.Ready) {
+                console.log("Failed to create component: " + component.errorString());
+            }
             dialog.show();
             destroyOnClose(dialog);
         }