MatrixChat: Stop the crawler function and delete the index when logging out.

pull/21833/head
Damir Jelić 2019-10-11 16:27:01 +02:00
parent 9ce478cb0e
commit b23ba5f881
1 changed files with 9 additions and 1 deletions

View File

@ -1221,7 +1221,15 @@ export default createReactClass({
/** /**
* Called when the session is logged out * Called when the session is logged out
*/ */
_onLoggedOut: function() { _onLoggedOut: async function() {
const platform = PlatformPeg.get();
if (platform.supportsEventIndexing()) {
console.log("Seshat: Deleting event index.");
this.crawlerRef.cancel();
await platform.deleteEventIndex();
}
this.notifyNewScreen('login'); this.notifyNewScreen('login');
this.setStateForNewView({ this.setStateForNewView({
view: VIEWS.LOGIN, view: VIEWS.LOGIN,