Stop pagination when root event received

This commit is contained in:
ismailgulek
2022-02-18 14:27:29 +03:00
parent 1904bd494c
commit d6147db250
@@ -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;
}