Merge pull request #4147 from matrix-org/jryans/locked-upgrade-dialog
Use latest backup status directly rather than via state
This commit is contained in:
commit
67fca76027
1 changed files with 9 additions and 4 deletions
|
@ -83,7 +83,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
|||
// does the server offer a UI auth flow with just m.login.password
|
||||
// for /keys/device_signing/upload?
|
||||
canUploadKeysWithPasswordOnly: null,
|
||||
accountPassword: props.accountPassword,
|
||||
accountPassword: props.accountPassword || "",
|
||||
accountPasswordCorrect: null,
|
||||
// status of the key backup toggle switch
|
||||
useKeyBackup: true,
|
||||
|
@ -117,6 +117,11 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
|||
backupInfo,
|
||||
backupSigStatus,
|
||||
});
|
||||
|
||||
return {
|
||||
backupInfo,
|
||||
backupSigStatus,
|
||||
};
|
||||
}
|
||||
|
||||
async _queryKeyUploadAuth() {
|
||||
|
@ -269,13 +274,13 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
|||
const RestoreKeyBackupDialog = sdk.getComponent('dialogs.keybackup.RestoreKeyBackupDialog');
|
||||
const { finished } = Modal.createTrackedDialog(
|
||||
'Restore Backup', '', RestoreKeyBackupDialog, {showSummary: false}, null,
|
||||
/* priority = */ false, /* static = */ true,
|
||||
/* priority = */ false, /* static = */ false,
|
||||
);
|
||||
|
||||
await finished;
|
||||
await this._fetchBackupInfo();
|
||||
const { backupSigStatus } = await this._fetchBackupInfo();
|
||||
if (
|
||||
this.state.backupSigStatus.usable &&
|
||||
backupSigStatus.usable &&
|
||||
this.state.canUploadKeysWithPasswordOnly &&
|
||||
this.state.accountPassword
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue