From 5543d8ee185608c383f137ab8333dc1a86eec3d5 Mon Sep 17 00:00:00 2001 From: Giom Foret Date: Thu, 8 Jun 2017 10:30:29 +0200 Subject: [PATCH] Initialise the read marker if it does not exist yet. Set it to the current read receipt position by default --- Riot/ViewController/RoomViewController.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Riot/ViewController/RoomViewController.m b/Riot/ViewController/RoomViewController.m index 561a55422..cdb367e25 100644 --- a/Riot/ViewController/RoomViewController.m +++ b/Riot/ViewController/RoomViewController.m @@ -3545,6 +3545,13 @@ else { self.jumpToLastUnreadBannerContainer.hidden = YES; + + // Initialize the read marker if it does not exist yet + if (!self.roomDataSource.room.accountData.readMarkerEventId) + { + // Move the read marker to the current read receipt position by default. + [self.roomDataSource.room forgetReadMarker]; + } } }