diff options
author | Joseph Donofry <joedonofry@gmail.com> | 2021-08-16 17:16:17 -0400 |
---|---|---|
committer | Joseph Donofry <joedonofry@gmail.com> | 2021-08-16 17:16:17 -0400 |
commit | 093f9f9e338f7898a2e3e3ed5673952639015cab (patch) | |
tree | 4117da7ddaf1bb2c2e3dbd8b51277343142f799c /src/timeline/TimelineModel.cpp | |
parent | Merge origin/master and fix conflicts (diff) | |
parent | Update qt5 path in macos deploy.sh script (diff) | |
download | nheko-093f9f9e338f7898a2e3e3ed5673952639015cab.tar.xz |
Merge remote-tracking branch 'nheko-im/master' into video_player_enhancements
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 99e00a67..79c28edf 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -310,7 +310,7 @@ qml_mtx_events::fromRoomEventType(qml_mtx_events::EventType t) return mtx::events::EventType::RoomMessage; //! m.image_pack, currently im.ponies.room_emotes case qml_mtx_events::ImagePackInRoom: - return mtx::events::EventType::ImagePackRooms; + return mtx::events::EventType::ImagePackInRoom; //! m.image_pack, currently im.ponies.user_emotes case qml_mtx_events::ImagePackInAccountData: return mtx::events::EventType::ImagePackInAccountData; @@ -418,6 +418,14 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj &events, &EventStore::enableKeyRequests); + connect(this, &TimelineModel::encryptionChanged, this, &TimelineModel::trustlevelChanged); + connect( + this, &TimelineModel::roomMemberCountChanged, this, &TimelineModel::trustlevelChanged); + connect(cache::client(), + &Cache::verificationStatusChanged, + this, + &TimelineModel::trustlevelChanged); + showEventTimer.callOnTimeout(this, &TimelineModel::scrollTimerEvent); } @@ -1993,6 +2001,15 @@ TimelineModel::roomTopic() const QString::fromStdString(info[room_id_].topic).toHtmlEscaped())); } +crypto::Trust +TimelineModel::trustlevel() const +{ + if (!isEncrypted_) + return crypto::Trust::Unverified; + + return cache::client()->roomVerificationStatus(room_id_.toStdString()); +} + int TimelineModel::roomMemberCount() const { |