Implement home screen activity indicators

This commit is contained in:
Andy Uhnak
2022-02-15 15:47:46 +00:00
parent 89da843d37
commit d8e790f8ea
19 changed files with 168 additions and 366 deletions
@@ -80,8 +80,6 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
@property (nonatomic, strong) RoomNotificationSettingsCoordinatorBridgePresenter *roomNotificationSettingsCoordinatorBridgePresenter;
@property (nonatomic, strong) GlobalActivityCenterPresenter *activityPresenter;
@end
@implementation RecentsViewController
@@ -141,8 +139,6 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.activityPresenter = [[GlobalActivityCenterPresenter alloc] init];
self.recentsTableView.accessibilityIdentifier = @"RecentsVCTableView";
// Register here the customized cell view class used to render recents
@@ -2414,15 +2410,23 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
#pragma mark - Activity Indicator
- (BOOL)providesCustomActivityIndicator {
return YES;
return self.activityPresenter != nil;
}
- (void)startActivityIndicator {
[self.activityPresenter presentActivityIndicatorWithAnimated:YES];
if (self.activityPresenter) {
[self.activityPresenter presentActivityIndicator];
} else {
[super startActivityIndicator];
}
}
- (void)stopActivityIndicator {
[self.activityPresenter removeCurrentActivityIndicatorWithAnimated:YES completion:nil];
if (self.activityPresenter) {
[self.activityPresenter removeCurrentActivityIndicatorWithAnimated:YES completion:nil];
} else {
[super stopActivityIndicator];
}
}
@end