mirror of https://github.com/vector-im/riot-web
Cache shouldLoadBackupStatus in state
parent
1c84abae44
commit
16a46be00f
|
@ -39,7 +39,7 @@ export default class LogoutDialog extends React.Component {
|
||||||
const shouldLoadBackupStatus = !lowBandwidth && !MatrixClientPeg.get().getKeyBackupEnabled();
|
const shouldLoadBackupStatus = !lowBandwidth && !MatrixClientPeg.get().getKeyBackupEnabled();
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
lowBandwidth: lowBandwidth,
|
shouldLoadBackupStatus: shouldLoadBackupStatus,
|
||||||
loading: shouldLoadBackupStatus,
|
loading: shouldLoadBackupStatus,
|
||||||
backupInfo: null,
|
backupInfo: null,
|
||||||
error: null,
|
error: null,
|
||||||
|
@ -113,7 +113,7 @@ export default class LogoutDialog extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (!this.state.lowBandwidth && !MatrixClientPeg.get().getKeyBackupEnabled()) {
|
if (this.state.shouldLoadBackupStatus) {
|
||||||
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
|
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
|
||||||
|
|
||||||
const description = <div>
|
const description = <div>
|
||||||
|
|
Loading…
Reference in New Issue