Show user indicators when paginating a room (#6234)

- implemented
This commit is contained in:
Gil Eluard
2022-06-03 09:46:34 +02:00
committed by GitHub
parent 51a7c7262d
commit 3364964c92
2 changed files with 17 additions and 0 deletions
+16
View File
@@ -1903,6 +1903,11 @@
return;
}
__block UserIndicatorCancel cancelIndicator;
NSTimer *indicatorTimer = [NSTimer scheduledTimerWithTimeInterval:0.5 repeats:NO block:^(NSTimer * _Nonnull timer) {
cancelIndicator = [self.userIndicatorStore presentLoadingWithLabel:[VectorL10n homeSyncing] isInteractionBlocking:NO];
}];
// Store the current height of the first bubble (if any)
backPaginationSavedFirstBubbleHeight = 0;
if (direction == MXTimelineDirectionBackwards && [roomDataSource tableView:_bubblesTableView numberOfRowsInSection:0])
@@ -1987,6 +1992,12 @@
{
[self updateCurrentEventIdAtTableBottom:NO];
}
[indicatorTimer invalidate];
if (cancelIndicator) {
cancelIndicator();
}
} failure:^(NSError *error) {
@@ -2002,6 +2013,11 @@
self.bubbleTableViewDisplayInTransition = NO;
[indicatorTimer invalidate];
if (cancelIndicator) {
cancelIndicator();
}
}];
}