From d550f6c564fa0a201d2f344b3a8fbc78fd788e75 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 24 Apr 2020 15:58:28 +0100 Subject: [PATCH] Fix incorrect toast if security setup skipped DevieListener didn't wait for the user's device list to be downloaded so it would think the user didn't have cross-signing set up. Also clear the rest of the state on stop(). Fixes https://github.com/vector-im/riot-web/issues/13372 --- src/DeviceListener.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/DeviceListener.js b/src/DeviceListener.js index 4ec2ec0fa0..41f249b335 100644 --- a/src/DeviceListener.js +++ b/src/DeviceListener.js @@ -66,6 +66,9 @@ export default class DeviceListener { MatrixClientPeg.get().removeListener('sync', this._onSync); } this._dismissed.clear(); + this._dismissedThisDeviceToast = false; + this._keyBackupInfo = null; + this._keyBackupFetchedAt = null; } dismissVerification(deviceId) { @@ -146,6 +149,8 @@ export default class DeviceListener { ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY); } else { if (!crossSigningReady) { + // make sure our keys are finished downlaoding + await cli.downloadKeys([cli.getUserId()]); // cross signing isn't enabled - nag to enable it // There are 3 different toasts for: if (cli.getStoredCrossSigningForUser(cli.getUserId())) {