From f3320f5041a6fb028475d553b3709f98208a012f Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 30 Jul 2020 19:09:47 +0100 Subject: [PATCH] Fix key backup warning on soft logout page It always showed the warning (if you had at least one session key in your store) because flagAllGroupSessionsForBackup returns the number of keys pending backup after flagging them all for backup, ie. all of them. Seems like the intention was to only show the warning if there were keys that had not yet been backed up. Fixes https://github.com/vector-im/riot-web/issues/14829 Requires https://github.com/matrix-org/matrix-js-sdk/pull/1429 --- src/components/structures/auth/SoftLogout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/auth/SoftLogout.js b/src/components/structures/auth/SoftLogout.js index 6577386fae..a539c8c9ee 100644 --- a/src/components/structures/auth/SoftLogout.js +++ b/src/components/structures/auth/SoftLogout.js @@ -72,7 +72,7 @@ export default class SoftLogout extends React.Component { this._initLogin(); - MatrixClientPeg.get().flagAllGroupSessionsForBackup().then(remaining => { + MatrixClientPeg.get().countSessionsNeedingBackup().then(remaining => { this.setState({keyBackupNeeded: remaining > 0}); }); }