diff options
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 1f239322..b461b0a1 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -2457,7 +2457,9 @@ void Room::Private::addHistoricalMessageEvents(RoomEvents&& events) emit q->updatedEvent(relation.eventId); } } - updateUnreadCount(from, historyEdge()); + if (updateUnreadCount(from, historyEdge()) != NoChange) + connection->saveRoomState(q); + // When there are no unread messages and the read marker is within the // known timeline, unreadMessages == -1 // (see https://github.com/quotient-im/libQuotient/wiki/unread_count). |