mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Key backup Rust API adoption (#1952)
* Adopt Rust side secure backup APIs (incomplete, based on poljar/backup-pr) * Implement the home screen recovery key confirmation banner. * Update with the latest Rust changes. The loading button for .unknown was incorrect. It should be treated as disabled. --------- Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
+2
-14
@@ -70,22 +70,10 @@ class SecureBackupKeyBackupScreenViewModel: SecureBackupKeyBackupScreenViewModel
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func enableBackup() {
|
||||
Task {
|
||||
switch await secureBackupController.enableBackup() {
|
||||
case .success:
|
||||
actionsSubject.send(.done)
|
||||
case .failure(let error):
|
||||
MXLog.error("Failed enabling key backup with error: \(error)")
|
||||
state.bindings.alertInfo = .init(id: .init())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private func disableBackup() {
|
||||
Task {
|
||||
switch await secureBackupController.disableBackup() {
|
||||
switch await secureBackupController.disable() {
|
||||
case .success:
|
||||
actionsSubject.send(.done)
|
||||
case .failure(let error):
|
||||
|
||||
Reference in New Issue
Block a user