From 06a1131081e4f49a91f40ce00227104ebe6cd8fd Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 23 Oct 2016 08:43:22 +0900 Subject: A couple of fixes according to the PR review Room::markMessagesAsRead: use the iterator to the message, not after the message. Room::setLastReadEvent: moved to protected --- room.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'room.h') diff --git a/room.h b/room.h index 049efeb6..9c745199 100644 --- a/room.h +++ b/room.h @@ -70,7 +70,6 @@ namespace QMatrixClient Q_INVOKABLE void setJoinState( JoinState state ); Q_INVOKABLE QString lastReadEvent(User* user); - Q_INVOKABLE void setLastReadEvent(User* user, QString eventId); /** * @brief Mark the message at the iterator as read * @@ -78,7 +77,7 @@ namespace QMatrixClient * receipt to the server either for this message or, if it's from * the local user, for the nearest non-local message before. */ - Q_INVOKABLE void markMessagesAsRead(Timeline::const_iterator iter); + Q_INVOKABLE void markMessagesAsRead(Timeline::const_iterator last); /** * @brief Mark the most recent message in the timeline as read * @@ -125,6 +124,8 @@ namespace QMatrixClient virtual void processStateEvents(const Events& events); virtual void processEphemeralEvent(Event* event); + void setLastReadEvent(User* user, QString eventId); + private: class Private; Private* d; -- cgit v1.2.3