Fix soft crash on soft logout page
This fixes a soft crash on the soft logout page, which can occur if it is shown very quickly after app startup before encryption has become enabled.
This commit is contained in:
parent
a8d878dc48
commit
a73fe72b09
1 changed files with 6 additions and 3 deletions
|
@ -72,10 +72,13 @@ export default class SoftLogout extends React.Component {
|
||||||
|
|
||||||
this._initLogin();
|
this._initLogin();
|
||||||
|
|
||||||
MatrixClientPeg.get().countSessionsNeedingBackup().then(remaining => {
|
const cli = MatrixClientPeg.get();
|
||||||
|
if (cli.isCryptoEnabled()) {
|
||||||
|
cli.countSessionsNeedingBackup().then(remaining => {
|
||||||
this.setState({ keyBackupNeeded: remaining > 0 });
|
this.setState({ keyBackupNeeded: remaining > 0 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onClearAll = () => {
|
onClearAll = () => {
|
||||||
const ConfirmWipeDeviceDialog = sdk.getComponent('dialogs.ConfirmWipeDeviceDialog');
|
const ConfirmWipeDeviceDialog = sdk.getComponent('dialogs.ConfirmWipeDeviceDialog');
|
||||||
|
|
Loading…
Reference in a new issue