summary refs log tree commit diff
path: root/src/timeline/TimelineModel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/timeline/TimelineModel.h')
-rw-r--r--src/timeline/TimelineModel.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h

index e3ca8811..417fbb7f 100644 --- a/src/timeline/TimelineModel.h +++ b/src/timeline/TimelineModel.h
@@ -293,6 +293,15 @@ public: crypto::Trust trustlevel() const; int roomMemberCount() const; + std::optional<mtx::events::collections::TimelineEvents> eventById(const QString &id) + { + auto e = events.get(id.toStdString(), ""); + if (e) + return *e; + else + return std::nullopt; + } + public slots: void setCurrentIndex(int index); int currentIndex() const { return idToIndex(currentId); }