diff --git a/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.m b/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.m index 88bd02a44..099d358d2 100644 --- a/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.m +++ b/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.m @@ -1448,6 +1448,16 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) { return NO; } } + + if (!USE_THREAD_TIMELINE && direction == MXTimelineDirectionBackwards && self.threadId) + { + // when not using a thread timeline, data source will desperately fill the screen with events by filtering them locally. + // we can stop when we see the thread root event when paginating backwards + if ([event.eventId isEqualToString:self.threadId]) + { + self.shouldStopBackPagination = YES; + } + } return YES; }