From 4fdc9c6e658a5c93fc9c433082ccd1e2cec8a4d0 Mon Sep 17 00:00:00 2001 From: gbubemismith Date: Thu, 11 Apr 2024 01:48:00 +0100 Subject: [PATCH] clear user index before account is totally cleaned up --- apps/desktop/src/app/app.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/src/app/app.component.ts b/apps/desktop/src/app/app.component.ts index 257921e2ad6..c1a83d9b219 100644 --- a/apps/desktop/src/app/app.component.ts +++ b/apps/desktop/src/app/app.component.ts @@ -587,6 +587,7 @@ export class AppComponent implements OnInit, OnDestroy { await this.passwordGenerationService.clear(userBeingLoggedOut); await this.vaultTimeoutSettingsService.clear(userBeingLoggedOut); await this.biometricStateService.logout(userBeingLoggedOut as UserId); + await this.searchService.clearIndex(); await this.stateEventRunnerService.handleEvent("logout", userBeingLoggedOut as UserId); @@ -609,7 +610,6 @@ export class AppComponent implements OnInit, OnDestroy { // This must come last otherwise the logout will prematurely trigger // a process reload before all the state service user data can be cleaned up if (userBeingLoggedOut === preLogoutActiveUserId) { - await this.searchService.clearIndex(); this.authService.logOut(async () => { if (expired) { this.platformUtilsService.showToast(