mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
SecurityVC: Delete a secure backup
This commit is contained in:
parent
cfd7d27cb4
commit
294618935c
1 changed files with 19 additions and 1 deletions
|
@ -635,6 +635,24 @@ SecretsRecoveryCoordinatorBridgePresenterDelegate>
|
|||
secretsRecoveryCoordinatorBridgePresenter.delegate = self;
|
||||
}
|
||||
|
||||
- (void)deleteSecureBackup
|
||||
{
|
||||
MXRecoveryService *recoveryService = self.mainSession.crypto.recoveryService;
|
||||
if (recoveryService)
|
||||
{
|
||||
[self startActivityIndicator];
|
||||
[recoveryService deleteRecoveryWithSuccess:^{
|
||||
[self stopActivityIndicator];
|
||||
[self reloadData];
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
[self stopActivityIndicator];
|
||||
[self reloadData];
|
||||
|
||||
[[AppDelegate theDelegate] showErrorAsAlert:error];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Segues
|
||||
|
||||
|
@ -920,7 +938,7 @@ SecretsRecoveryCoordinatorBridgePresenterDelegate>
|
|||
case SECURE_BACKUP_DELETE:
|
||||
{
|
||||
MXKTableViewCellWithButton *buttonCell = [self buttonCellWithTitle:@"Delete Secure Backup" // TODO
|
||||
action:@selector(displayComingSoon)
|
||||
action:@selector(deleteSecureBackup)
|
||||
forTableView:tableView
|
||||
atIndexPath:indexPath];
|
||||
buttonCell.mxkButton.tintColor = ThemeService.shared.theme.warningColor;
|
||||
|
|
Loading…
Reference in a new issue