summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-07-21 10:08:04 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2021-07-21 12:36:02 -0400
commitb17002929c2e968835b510bd47c02d9df2461bc3 (patch)
treed33ac199d1188ca079c75d88c1dc035d4adc5437 /src
parentFix the loading spinner setup (diff)
downloadnheko-b17002929c2e968835b510bd47c02d9df2461bc3.tar.xz
Open room members when member info label clicked
Diffstat (limited to 'src')
-rw-r--r--src/MemberList.cpp2
-rw-r--r--src/MemberList.h2
-rw-r--r--src/timeline/TimelineModel.cpp4
-rw-r--r--src/timeline/TimelineModel.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/MemberList.cpp b/src/MemberList.cpp

index 415e3b57..0ef3b696 100644 --- a/src/MemberList.cpp +++ b/src/MemberList.cpp
@@ -22,7 +22,7 @@ #include "timeline/TimelineViewManager.h" #include "ui/Avatar.h" -MemberList::MemberList(const QString &room_id, QWidget *parent) +MemberList::MemberList(const QString &room_id, QObject *parent) : QAbstractListModel{parent} , room_id_{room_id} { diff --git a/src/MemberList.h b/src/MemberList.h
index 070666a2..9932f6a4 100644 --- a/src/MemberList.h +++ b/src/MemberList.h
@@ -25,7 +25,7 @@ public: DisplayName, AvatarUrl, }; - MemberList(const QString &room_id, QWidget *parent = nullptr); + MemberList(const QString &room_id, QObject *parent = nullptr); QHash<int, QByteArray> roleNames() const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 66d931fd..e9fa4a05 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -1067,9 +1067,9 @@ TimelineModel::openUserProfile(QString userid) } void -TimelineModel::openRoomMembers() +TimelineModel::openRoomMembers(QString room_id) { - MemberList *memberList = new MemberList(roomId()); + MemberList *memberList = new MemberList(room_id == QString() ? roomId() : room_id, this); emit openRoomMembersDialog(memberList); } diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h
index 0d1eb1f9..077245cb 100644 --- a/src/timeline/TimelineModel.h +++ b/src/timeline/TimelineModel.h
@@ -239,7 +239,7 @@ public: Q_INVOKABLE void forwardMessage(QString eventId, QString roomId); Q_INVOKABLE void viewDecryptedRawMessage(QString id) const; Q_INVOKABLE void openUserProfile(QString userid); - Q_INVOKABLE void openRoomMembers(); + Q_INVOKABLE void openRoomMembers(QString room_id = QString()); Q_INVOKABLE void openRoomSettings(QString room_id = QString()); Q_INVOKABLE void openInviteUsers(QString roomId = QString()); Q_INVOKABLE void editAction(QString id);