diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-07-20 00:42:48 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-07-20 00:42:48 +0200 |
commit | 19f27236ea82b1927c83e4e24c71b30061674ee7 (patch) | |
tree | 1f6449488bbbd4dc23827253bbf56096f8f949e7 /src/timeline/TimelineModel.h | |
parent | Fix reaction display (diff) | |
download | nheko-19f27236ea82b1927c83e4e24c71b30061674ee7.tar.xz |
Fix reactions
Diffstat (limited to 'src/timeline/TimelineModel.h')
-rw-r--r-- | src/timeline/TimelineModel.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h index cbe88fd2..f8a84f17 100644 --- a/src/timeline/TimelineModel.h +++ b/src/timeline/TimelineModel.h @@ -197,6 +197,15 @@ public: Q_INVOKABLE void cacheMedia(QString eventId); Q_INVOKABLE bool saveMedia(QString eventId) const; + std::vector<::Reaction> reactions(const std::string &event_id) + { + auto list = events.reactions(event_id); + std::vector<::Reaction> vec; + for (const auto &r : list) + vec.push_back(r.value<Reaction>()); + return vec; + } + void updateLastMessage(); void addEvents(const mtx::responses::Timeline &events); template<class T> |