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
Review comments
This commit is contained in:
@ -380,21 +380,10 @@ export function startMatrixClient() {
|
||||
*/
|
||||
export function onLoggedOut() {
|
||||
_clearLocalStorage();
|
||||
_clearIndexedDB();
|
||||
stopMatrixClient();
|
||||
dis.dispatch({action: 'on_logged_out'});
|
||||
}
|
||||
|
||||
function _clearIndexedDB() {
|
||||
// remove indexeddb instances
|
||||
if (!window.indexedDB) {
|
||||
return;
|
||||
}
|
||||
console.log("Clearing indexeddb");
|
||||
window.indexedDB.deleteDatabase("matrix-js-sdk");
|
||||
// TODO: Remove logs db as well.
|
||||
}
|
||||
|
||||
function _clearLocalStorage() {
|
||||
if (!window.localStorage) {
|
||||
return;
|
||||
@ -423,6 +412,7 @@ export function stopMatrixClient() {
|
||||
if (cli) {
|
||||
cli.stopClient();
|
||||
cli.removeAllListeners();
|
||||
cli.store.deleteAllData();
|
||||
MatrixClientPeg.unset();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user