You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Add basic storage consistency check
This adds a storage consistency check just before creating a client on login. Each data store we use is checked for data and any problems are logged to the console. Fixes https://github.com/vector-im/riot-web/issues/9271
This commit is contained in:
@ -31,7 +31,8 @@ import Modal from './Modal';
|
||||
import sdk from './index';
|
||||
import ActiveWidgetStore from './stores/ActiveWidgetStore';
|
||||
import PlatformPeg from "./PlatformPeg";
|
||||
import {sendLoginRequest} from "./Login";
|
||||
import { sendLoginRequest } from "./Login";
|
||||
import * as StorageManager from './utils/StorageManager';
|
||||
|
||||
/**
|
||||
* Called at startup, to attempt to build a logged-in Matrix session. It tries
|
||||
@ -353,6 +354,8 @@ async function _doSetLoggedIn(credentials, clearStorage) {
|
||||
await _clearStorage();
|
||||
}
|
||||
|
||||
await StorageManager.checkConsistency();
|
||||
|
||||
Analytics.setLoggedIn(credentials.guest, credentials.homeserverUrl, credentials.identityServerUrl);
|
||||
|
||||
if (localStorage) {
|
||||
|
Reference in New Issue
Block a user