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
LifeCycle: Stop the crawler and delete the index when whe log out.
This commit is contained in:
@ -613,6 +613,7 @@ export function onLoggedOut() {
|
|||||||
// so that React components unmount first. This avoids React soft crashes
|
// so that React components unmount first. This avoids React soft crashes
|
||||||
// that can occur when components try to use a null client.
|
// that can occur when components try to use a null client.
|
||||||
dis.dispatch({action: 'on_logged_out'});
|
dis.dispatch({action: 'on_logged_out'});
|
||||||
|
EventIndexPeg.deleteEventIndex().done();
|
||||||
stopMatrixClient();
|
stopMatrixClient();
|
||||||
_clearStorage().done();
|
_clearStorage().done();
|
||||||
}
|
}
|
||||||
@ -648,6 +649,7 @@ export function stopMatrixClient(unsetClient=true) {
|
|||||||
ActiveWidgetStore.stop();
|
ActiveWidgetStore.stop();
|
||||||
IntegrationManagers.sharedInstance().stopWatching();
|
IntegrationManagers.sharedInstance().stopWatching();
|
||||||
if (DMRoomMap.shared()) DMRoomMap.shared().stop();
|
if (DMRoomMap.shared()) DMRoomMap.shared().stop();
|
||||||
|
EventIndexPeg.stop();
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
if (cli) {
|
if (cli) {
|
||||||
cli.stopClient();
|
cli.stopClient();
|
||||||
|
Reference in New Issue
Block a user