summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-04-30 15:33:17 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-04-30 15:33:17 +0200
commit986b561c344e7f500418e37ecd03b36c8011bcf6 (patch)
treead52e9647894ea553c9b697e3dfdddf7816740ac /src/timeline
parentUpdate mtxclient to use new login parameters (diff)
downloadnheko-986b561c344e7f500418e37ecd03b36c8011bcf6.tar.xz
Fix crash when you have no rooms and open the profile as well as not rendering rooms without groups
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/TimelineModel.cpp6
-rw-r--r--src/timeline/TimelineModel.h3
-rw-r--r--src/timeline/TimelineViewManager.h1
3 files changed, 5 insertions, 5 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index 2f7bfdd2..c472ab33 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -854,12 +854,12 @@ TimelineModel::viewDecryptedRawMessage(QString id) const } void -TimelineModel::openUserProfile(QString userid, bool global) +TimelineModel::openUserProfile(QString userid) { - UserProfile *userProfile = new UserProfile(global ? "" : room_id_, userid, manager_, this); + UserProfile *userProfile = new UserProfile(room_id_, userid, manager_, this); connect( this, &TimelineModel::roomAvatarUrlChanged, userProfile, &UserProfile::updateAvatarUrl); - emit openProfile(userProfile); + emit manager_->openProfile(userProfile); } void diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h
index 4dbb1c08..33e77f53 100644 --- a/src/timeline/TimelineModel.h +++ b/src/timeline/TimelineModel.h
@@ -223,7 +223,7 @@ public: Q_INVOKABLE void viewRawMessage(QString id) const; Q_INVOKABLE void forwardMessage(QString eventId, QString roomId); Q_INVOKABLE void viewDecryptedRawMessage(QString id) const; - Q_INVOKABLE void openUserProfile(QString userid, bool global = false); + Q_INVOKABLE void openUserProfile(QString userid); Q_INVOKABLE void openRoomSettings(); Q_INVOKABLE void editAction(QString id); Q_INVOKABLE void replyAction(QString id); @@ -322,7 +322,6 @@ signals: void newCallEvent(const mtx::events::collections::TimelineEvents &event); void scrollToIndex(int index); - void openProfile(UserProfile *profile); void openRoomSettingsDialog(RoomSettings *settings); void newMessageToSend(mtx::events::collections::TimelineEvents event); diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h
index aa24b220..b23a61db 100644 --- a/src/timeline/TimelineViewManager.h +++ b/src/timeline/TimelineViewManager.h
@@ -93,6 +93,7 @@ signals: void focusChanged(); void focusInput(); void openImageOverlayInternalCb(QString eventId, QImage img); + void openProfile(UserProfile *profile); public slots: void updateReadReceipts(const QString &room_id, const std::vector<QString> &event_ids);