Merge pull request #4489 from matrix-org/dbkr/correct_toast_rel

Fix incorrect toast if security setup skipped
This commit is contained in:
David Baker 2020-04-24 17:40:33 +01:00 committed by GitHub
commit cb4030f0c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,6 +66,9 @@ export default class DeviceListener {
MatrixClientPeg.get().removeListener('sync', this._onSync); MatrixClientPeg.get().removeListener('sync', this._onSync);
} }
this._dismissed.clear(); this._dismissed.clear();
this._dismissedThisDeviceToast = false;
this._keyBackupInfo = null;
this._keyBackupFetchedAt = null;
} }
dismissVerification(deviceId) { dismissVerification(deviceId) {
@ -146,6 +149,8 @@ export default class DeviceListener {
ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY); ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY);
} else { } else {
if (!crossSigningReady) { if (!crossSigningReady) {
// make sure our keys are finished downlaoding
await cli.downloadKeys([cli.getUserId()]);
// cross signing isn't enabled - nag to enable it // cross signing isn't enabled - nag to enable it
// There are 3 different toasts for: // There are 3 different toasts for:
if (cli.getStoredCrossSigningForUser(cli.getUserId())) { if (cli.getStoredCrossSigningForUser(cli.getUserId())) {