Update SignOutAlertPresenter to handle backup in progress case

This commit is contained in:
SBiOSoftWhare
2019-02-14 18:06:37 +01:00
parent e6f29cf47d
commit 31419276ee
2 changed files with 31 additions and 11 deletions
@@ -252,7 +252,7 @@ SignOutAlertPresenterDelegate>
@property (nonatomic) BOOL newPhoneEditingEnabled;
@property (nonatomic, weak) DeactivateAccountViewController *deactivateAccountViewController;
@property (nonatomic, strong) SignOutAlertPresenter *signOutPresenter;
@property (nonatomic, strong) SignOutAlertPresenter *signOutAlertPresenter;
@property (nonatomic, weak) UIButton *signOutButton;
@end
@@ -357,8 +357,8 @@ SignOutAlertPresenterDelegate>
}];
[self userInterfaceThemeDidChange];
self.signOutPresenter = [SignOutAlertPresenter new];
self.signOutPresenter.delegate = self;
self.signOutAlertPresenter = [SignOutAlertPresenter new];
self.signOutAlertPresenter.delegate = self;
}
- (void)userInterfaceThemeDidChange
@@ -2709,8 +2709,9 @@ SignOutAlertPresenterDelegate>
- (void)onSignout:(id)sender
{
self.signOutButton = (UIButton*)sender;
self.signOutPresenter.isABackupExist = !(self.mainSession.crypto.backup.state == MXKeyBackupStateDisabled);
[self.signOutPresenter presentFrom:self animated:YES];
MXKeyBackupState backupState = self.mainSession.crypto.backup.state;
[self.signOutAlertPresenter presentFor:backupState from:self animated:YES];
}
- (void)onRemove3PID:(NSIndexPath*)path