mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-25 11:02:48 +02:00
* Loading animation: Fix the bug where, after authentication, the animation disappeared too early and made auth screen flashed.
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
|
||||
#import "Riot-Swift.h"
|
||||
|
||||
@interface MasterTabBarController ()
|
||||
@interface MasterTabBarController () <AuthenticationViewControllerDelegate>
|
||||
{
|
||||
// Array of `MXSession` instances.
|
||||
NSMutableArray *mxSessionArray;
|
||||
@@ -79,6 +79,8 @@
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
|
||||
_authenticationInProgress = NO;
|
||||
|
||||
// Note: UITabBarViewController shoud not be embed in a UINavigationController (https://github.com/vector-im/riot-ios/issues/3086)
|
||||
[self vc_removeBackTitle];
|
||||
|
||||
@@ -418,6 +420,7 @@
|
||||
if (!self.authViewController && !isAuthViewControllerPreparing)
|
||||
{
|
||||
isAuthViewControllerPreparing = YES;
|
||||
_authenticationInProgress = YES;
|
||||
|
||||
[self resetReviewSessionsFlags];
|
||||
|
||||
@@ -464,6 +467,7 @@
|
||||
if (!self.authViewController && !isAuthViewControllerPreparing)
|
||||
{
|
||||
isAuthViewControllerPreparing = YES;
|
||||
_authenticationInProgress = YES;
|
||||
|
||||
[[AppDelegate theDelegate] restoreInitialDisplay:^{
|
||||
|
||||
@@ -695,6 +699,9 @@
|
||||
_authViewController = segue.destinationViewController;
|
||||
isAuthViewControllerPreparing = NO;
|
||||
|
||||
// Listen to the end of the authentication flow
|
||||
_authViewController.authVCDelegate = self;
|
||||
|
||||
authViewControllerObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXKAccountManagerDidAddAccountNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
|
||||
|
||||
_authViewController = nil;
|
||||
@@ -1163,4 +1170,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - AuthenticationViewControllerDelegate
|
||||
|
||||
- (void)authenticationViewControllerDidDismiss:(AuthenticationViewController *)authenticationViewController
|
||||
{
|
||||
_authenticationInProgress = NO;
|
||||
if (self.masterVCDelegate)
|
||||
{
|
||||
[self.masterVCDelegate masterTabBarControllerDidCompleteAuthentication:self];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user