Show backup import UI on Link-and-Sync
This commit is contained in:
parent
936d21d749
commit
0c038f2971
2 changed files with 15 additions and 1 deletions
|
@ -363,7 +363,7 @@ function finishInstall(
|
||||||
const accountManager = window.getAccountManager();
|
const accountManager = window.getAccountManager();
|
||||||
strictAssert(accountManager, 'Expected an account manager');
|
strictAssert(accountManager, 'Expected an account manager');
|
||||||
|
|
||||||
if (isBackupEnabled()) {
|
if (isBackupEnabled() || provisioner.isLinkAndSync()) {
|
||||||
dispatch({ type: SHOW_BACKUP_IMPORT });
|
dispatch({ type: SHOW_BACKUP_IMPORT });
|
||||||
} else {
|
} else {
|
||||||
dispatch({ type: SHOW_LINK_IN_PROGRESS });
|
dispatch({ type: SHOW_LINK_IN_PROGRESS });
|
||||||
|
|
|
@ -227,6 +227,20 @@ export class Provisioner {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public isLinkAndSync(): boolean {
|
||||||
|
strictAssert(
|
||||||
|
this.state.step === Step.ReadyToLink,
|
||||||
|
`Invalid state for prepareLinkData: ${this.state.step}`
|
||||||
|
);
|
||||||
|
|
||||||
|
const { envelope } = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
isLinkAndSyncEnabled(this.appVersion) &&
|
||||||
|
Bytes.isNotEmpty(envelope.ephemeralBackupKey)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
private handleRequest(request: IncomingWebSocketRequest): void {
|
private handleRequest(request: IncomingWebSocketRequest): void {
|
||||||
const pubKey = this.cipher.getPublicKey();
|
const pubKey = this.cipher.getPublicKey();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue