Fix RustBackupManager remaining values after current backup removal. #4534 (#4537)

This commit is contained in:
Florian Duros
2024-11-21 14:21:37 +01:00
committed by GitHub
parent 2210255d6f
commit 2dd4334e20
2 changed files with 40 additions and 2 deletions
+5
View File
@@ -583,6 +583,11 @@ export class RustBackupManager extends TypedEventEmitter<RustBackupCryptoEvents,
await this.http.authedRequest<void>(Method.Delete, path, undefined, undefined, {
prefix: ClientPrefix.V3,
});
// If the backup we are deleting is the active one, we need to disable the key backup and to have the local properties reset
if (this.activeBackupVersion === version) {
this.serverBackupInfo = null;
await this.disableKeyBackup();
}
}
/**