From 146969083538019ce73ba9e451c4fd8a6d463a84 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 23 Mar 2020 14:48:55 +0000 Subject: [PATCH] Fix logout when Olm failed to load. Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/dialogs/LogoutDialog.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/views/dialogs/LogoutDialog.js b/src/components/views/dialogs/LogoutDialog.js index fed1310469..23a6692b39 100644 --- a/src/components/views/dialogs/LogoutDialog.js +++ b/src/components/views/dialogs/LogoutDialog.js @@ -21,7 +21,6 @@ import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; import {MatrixClientPeg} from '../../../MatrixClientPeg'; -import SettingsStore from "../../../settings/SettingsStore"; export default class LogoutDialog extends React.Component { defaultProps = { @@ -36,8 +35,8 @@ export default class LogoutDialog extends React.Component { this._onSetRecoveryMethodClick = this._onSetRecoveryMethodClick.bind(this); this._onLogoutConfirm = this._onLogoutConfirm.bind(this); - const lowBandwidth = SettingsStore.getValue("lowBandwidth"); - const shouldLoadBackupStatus = !lowBandwidth && !MatrixClientPeg.get().getKeyBackupEnabled(); + const cli = MatrixClientPeg.get(); + const shouldLoadBackupStatus = cli.isCryptoEnabled() && !cli.getKeyBackupEnabled(); this.state = { shouldLoadBackupStatus: shouldLoadBackupStatus,