Merge branch 'develop' into gil/5769_add_trigger_to_join_and_view_room_metrics_event

This commit is contained in:
Gil Eluard
2022-03-15 10:32:19 +01:00
13 changed files with 143 additions and 40 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];
@@ -2434,16 +2439,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];
}
@@ -2451,7 +2456,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
- (void)stopActivityIndicator {
if (self.indicatorPresenter) {
[self.indicatorPresenter dismissActivityIndicator];
[self.indicatorPresenter dismissLoadingIndicator];
} else {
[super stopActivityIndicator];
}