diff options
author | DeepBlueV7.X <nicolas.werner@hotmail.de> | 2022-03-29 20:54:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 20:54:45 +0200 |
commit | f9e294ce0c34bbf820320bbe124de2175aefa0ee (patch) | |
tree | 6e32446bbbae091977c8103a502a27ce924df340 /src/timeline | |
parent | Avoid empty membership events (diff) | |
parent | Add backend for new room creation dialogs (diff) | |
download | nheko-f9e294ce0c34bbf820320bbe124de2175aefa0ee.tar.xz |
Merge pull request #1019 from maltee1/qml_createroom
CreateRoom dialog in QML
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/TimelineViewManager.cpp | 8 | ||||
-rw-r--r-- | src/timeline/TimelineViewManager.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp index a18f3ee2..3bccd8f3 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp @@ -199,6 +199,14 @@ TimelineViewManager::openGlobalUserProfile(QString userId) emit openProfile(profile); } +UserProfile * +TimelineViewManager::getGlobalUserProfile(QString userId) +{ + UserProfile *profile = new UserProfile{QString{}, userId, this}; + QQmlEngine::setObjectOwnership(profile, QQmlEngine::JavaScriptOwnership); + return (profile); +} + void TimelineViewManager::setVideoCallItem() { diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h index 393b1479..07ebfe79 100644 --- a/src/timeline/TimelineViewManager.h +++ b/src/timeline/TimelineViewManager.h @@ -67,6 +67,7 @@ public: Q_INVOKABLE void openRoomSettings(QString room_id); Q_INVOKABLE void openInviteUsers(QString roomId); Q_INVOKABLE void openGlobalUserProfile(QString userId); + Q_INVOKABLE UserProfile *getGlobalUserProfile(QString userId); Q_INVOKABLE void focusMessageInput(); |