From d34067a25792b5d69b2ce3192486189f0db12abb Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 18 Sep 2019 23:37:30 +0200 Subject: Enable read receipts action and sync read receipts from cache --- src/timeline2/TimelineModel.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/timeline2/TimelineModel.h') diff --git a/src/timeline2/TimelineModel.h b/src/timeline2/TimelineModel.h index b651708d..2cd22661 100644 --- a/src/timeline2/TimelineModel.h +++ b/src/timeline2/TimelineModel.h @@ -131,6 +131,7 @@ public: Q_INVOKABLE QString escapeEmoji(QString str) const; Q_INVOKABLE void viewRawMessage(QString id) const; Q_INVOKABLE void replyAction(QString id); + Q_INVOKABLE void readReceiptsAction(QString id) const; Q_INVOKABLE int idToIndex(QString id) const; Q_INVOKABLE QString indexToId(int index) const; @@ -146,10 +147,10 @@ public slots: emit currentIndexChanged(index); } int currentIndex() const { return idToIndex(currentId); } + void markEventsAsRead(const std::vector &event_ids); private slots: // Add old events at the top of the timeline. - void addBackwardsEvents(const mtx::responses::Messages &msgs); signals: @@ -165,7 +166,7 @@ private: const std::vector &timeline); QHash events; - QSet pending, failed; + QSet pending, failed, read; std::vector eventOrder; QString room_id_; -- cgit 1.5.1