diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-01-27 07:55:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-27 07:55:02 +0900 |
commit | 0a653e0e1c6c050f54df12663539cdb2e02717d8 (patch) | |
tree | 1591810ef12ef5b6b43d1dec4331e5a83587c298 /room.h | |
parent | f37874c7e55239359d02b926a65cd62d17336522 (diff) | |
parent | c4877e0abaef4570362c8e9cc0203effdc6cb0ee (diff) | |
download | libquotient-0a653e0e1c6c050f54df12663539cdb2e02717d8.tar.gz libquotient-0a653e0e1c6c050f54df12663539cdb2e02717d8.zip |
Merge pull request #52 from Fxrh/kitsune-reverse-iterators
Room: Use reverse iterators internally to deal with read markers
Diffstat (limited to 'room.h')
-rw-r--r-- | room.h | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -79,13 +79,10 @@ namespace QMatrixClient * Finds in the timeline and marks as read the event with * the specified id; also posts a read receipt to the server either * for this message or, if it's from the local user, for - * the nearest non-local message before. + * the nearest non-local message before. If the event id is empty, + * marks the whole timeline as read. */ - Q_INVOKABLE void markMessagesAsRead(QString uptoEventId); - /** - * @brief Mark the whole room timeline as read - */ - Q_INVOKABLE void markMessagesAsRead(); + Q_INVOKABLE void markMessagesAsRead(QString uptoEventId = {}); Q_INVOKABLE bool hasUnreadMessages(); @@ -132,8 +129,6 @@ namespace QMatrixClient virtual void processStateEvents(const Events& events); virtual void processEphemeralEvent(Event* event); - Timeline::const_iterator promoteReadMarker(User* u, QString eventId); - private: class Private; Private* d; |