Update activity indicators on leaving room

Signed-off-by: Andy Uhnak <andyuhnak@gmail.com>
This commit is contained in:
Andy Uhnak
2022-02-17 11:10:55 +00:00
parent 1904bd494c
commit 9eae7c02bb
18 changed files with 437 additions and 84 deletions
@@ -1280,8 +1280,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
MXRoom *room = [self.mainSession roomWithRoomId:currentRoomId];
if (room)
{
[self startActivityIndicator];
[self startActivityIndicatorWithLabel:[VectorL10n roomParticipantsLeaveProcessing]];
// cancel pending uploads/downloads
// they are useless by now
[MXMediaManager cancelDownloadsInCacheFolder:room.roomId];
@@ -1296,6 +1295,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
{
typeof(self) self = weakSelf;
[self stopActivityIndicator];
[self.activityPresenter presentSuccessWithLabel:[VectorL10n roomParticipantsLeaveSuccess]];
// Force table refresh
[self cancelEditionMode:YES];
}
@@ -2413,6 +2413,14 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
return self.activityPresenter != nil;
}
- (void)startActivityIndicatorWithLabel:(NSString *)label {
if (self.activityPresenter) {
[self.activityPresenter presentActivityIndicatorWithLabel:label];
} else {
[super startActivityIndicator];
}
}
- (void)startActivityIndicator {
if (self.activityPresenter) {
[self.activityPresenter presentActivityIndicator];