clear active thread state on logout
This commit is contained in:
@@ -2,6 +2,7 @@ import { createClient, MatrixClient, IndexedDBStore, IndexedDBCryptoStore } from
|
||||
|
||||
import { cryptoCallbacks } from './secretStorageKeys';
|
||||
import { clearNavToActivePathStore } from '../app/state/navToActivePath';
|
||||
import { clearRoomToActiveThreadStore } from '../app/state/roomToActiveThread';
|
||||
|
||||
type Session = {
|
||||
baseUrl: string;
|
||||
@@ -49,6 +50,7 @@ export const startClient = async (mx: MatrixClient) => {
|
||||
export const clearCacheAndReload = async (mx: MatrixClient) => {
|
||||
mx.stopClient();
|
||||
clearNavToActivePathStore(mx.getSafeUserId());
|
||||
clearRoomToActiveThreadStore(mx.getSafeUserId());
|
||||
await mx.store.deleteAllData();
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user