1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-27 04:21:52 +03:00

recalculate toasts when cross-signing gets en/disabled

This commit is contained in:
Bruno Windels
2020-04-09 13:43:51 +02:00
parent 291fae6493
commit 282577cefb

View File

@ -50,6 +50,7 @@ export default class DeviceListener {
MatrixClientPeg.get().on('crypto.devicesUpdated', this._onDevicesUpdated); MatrixClientPeg.get().on('crypto.devicesUpdated', this._onDevicesUpdated);
MatrixClientPeg.get().on('deviceVerificationChanged', this._onDeviceVerificationChanged); MatrixClientPeg.get().on('deviceVerificationChanged', this._onDeviceVerificationChanged);
MatrixClientPeg.get().on('userTrustStatusChanged', this._onUserTrustStatusChanged); MatrixClientPeg.get().on('userTrustStatusChanged', this._onUserTrustStatusChanged);
MatrixClientPeg.get().on('crossSigning.keysChanged', this._onCrossSingingKeysChanged);
MatrixClientPeg.get().on('accountData', this._onAccountData); MatrixClientPeg.get().on('accountData', this._onAccountData);
this._recheck(); this._recheck();
} }
@ -59,6 +60,7 @@ export default class DeviceListener {
MatrixClientPeg.get().removeListener('crypto.devicesUpdated', this._onDevicesUpdated); MatrixClientPeg.get().removeListener('crypto.devicesUpdated', this._onDevicesUpdated);
MatrixClientPeg.get().removeListener('deviceVerificationChanged', this._onDeviceVerificationChanged); MatrixClientPeg.get().removeListener('deviceVerificationChanged', this._onDeviceVerificationChanged);
MatrixClientPeg.get().removeListener('userTrustStatusChanged', this._onUserTrustStatusChanged); MatrixClientPeg.get().removeListener('userTrustStatusChanged', this._onUserTrustStatusChanged);
MatrixClientPeg.get().removeListener('crossSigning.keysChanged', this._onCrossSingingKeysChanged);
MatrixClientPeg.get().removeListener('accountData', this._onAccountData); MatrixClientPeg.get().removeListener('accountData', this._onAccountData);
} }
this._dismissed.clear(); this._dismissed.clear();
@ -89,6 +91,10 @@ export default class DeviceListener {
this._recheck(); this._recheck();
} }
_onCrossSingingKeysChanged = () => {
this._recheck();
}
_onAccountData = (ev) => { _onAccountData = (ev) => {
// User may have: // User may have:
// * migrated SSSS to symmetric // * migrated SSSS to symmetric