summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-15 20:32:22 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-15 20:32:22 +0300
commit31d09dbd68f9fbc127c78fdedae9d446c5a8db60 (patch)
tree0323a22ac8d576b68c08fffcc51bfc423601a857 /include
parentUse the http link for video messages (diff)
downloadnheko-31d09dbd68f9fbc127c78fdedae9d446c5a8db60.tar.xz
De-duplicate the m.room.encryption event
Diffstat (limited to 'include')
-rw-r--r--include/timeline/TimelineView.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/timeline/TimelineView.h b/include/timeline/TimelineView.h

index 97bac51a..e6b80637 100644 --- a/include/timeline/TimelineView.h +++ b/include/timeline/TimelineView.h
@@ -165,7 +165,7 @@ protected: private: using TimelineEvent = mtx::events::collections::TimelineEvents; - QWidget *relativeWidget(TimelineItem *item, int dt) const; + QWidget *relativeWidget(QWidget *item, int dt) const; DecryptionResult parseEncryptedEvent( const mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> &e); @@ -265,6 +265,9 @@ private: QWidget *parseMessageEvent(const mtx::events::collections::TimelineEvents &event, TimelineDirection direction); + //! Store the event id associated with the given widget. + void saveEventId(QWidget *widget); + QVBoxLayout *top_layout_; QVBoxLayout *scroll_layout_; @@ -313,7 +316,7 @@ private: void renderTopEvents(const std::vector<TimelineEvent> &events); // The events currently rendered. Used for duplicate detection. - QMap<QString, TimelineItem *> eventIds_; + QMap<QString, QWidget *> eventIds_; QQueue<PendingMessage> pending_msgs_; QList<PendingMessage> pending_sent_msgs_; };