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
This commit is contained in:
David Baker 2020-07-30 19:09:47 +01:00
parent b1f8fe40d6
commit f3320f5041

View file

@ -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});
});
}