From 838cf63578d2145e9264bd37e68993f6e6e8d132 Mon Sep 17 00:00:00 2001 From: Malte E Date: Sat, 26 Mar 2022 22:25:48 +0100 Subject: direct chat creator can now create direct chats --- src/timeline/TimelineViewManager.cpp | 8 ++++++++ src/timeline/TimelineViewManager.h | 1 + 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp index a18f3ee2..72f89fd4 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..807fe76f 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(); -- cgit 1.5.1