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 cf556e2592
commit 2809c2c58e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

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();
}
}];
}

1
changelog.d/5746.change Normal file
View file

@ -0,0 +1 @@
Show user indicators when paginating a room