From 31d09dbd68f9fbc127c78fdedae9d446c5a8db60 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sun, 15 Jul 2018 20:32:22 +0300 Subject: De-duplicate the m.room.encryption event --- include/timeline/TimelineView.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') 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 &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 &events); // The events currently rendered. Used for duplicate detection. - QMap eventIds_; + QMap eventIds_; QQueue pending_msgs_; QList pending_sent_msgs_; }; -- cgit 1.5.1