Merge branch 'master' into develop

This commit is contained in:
Andy Uhnak
2022-03-14 16:26:07 +00:00
12 changed files with 141 additions and 38 deletions
@@ -64,6 +64,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
// when the user selects it.
UISearchBar *tableSearchBar;
// Flag indicating whether the view controller is (at least partially) visible and not dissapearing
BOOL isViewVisible;
// Observe kThemeServiceDidChangeThemeNotification to handle user interface theme change.
__weak id kThemeServiceDidChangeThemeNotificationObserver;
}
@@ -264,6 +267,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
isViewVisible = YES;
[self.screenTracker trackScreen];
@@ -301,6 +305,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
isViewVisible = NO;
// Leave potential editing mode
[self cancelEditionMode:NO];
@@ -2419,16 +2424,16 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
}
- (void)startActivityIndicatorWithLabel:(NSString *)label {
if (self.indicatorPresenter) {
[self.indicatorPresenter presentActivityIndicatorWithLabel:label];
if (self.indicatorPresenter && isViewVisible) {
[self.indicatorPresenter presentLoadingIndicatorWithLabel:label];
} else {
[super startActivityIndicator];
}
}
- (void)startActivityIndicator {
if (self.indicatorPresenter) {
[self.indicatorPresenter presentActivityIndicator];
if (self.indicatorPresenter && isViewVisible) {
[self.indicatorPresenter presentLoadingIndicator];
} else {
[super startActivityIndicator];
}
@@ -2436,7 +2441,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
- (void)stopActivityIndicator {
if (self.indicatorPresenter) {
[self.indicatorPresenter dismissActivityIndicator];
[self.indicatorPresenter dismissLoadingIndicator];
} else {
[super stopActivityIndicator];
}