mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
fixed issue with clearing search index state
This commit is contained in:
@@ -1171,6 +1171,7 @@ export default class MainBackground {
|
|||||||
this.vaultTimeoutSettingsService.clear(userId),
|
this.vaultTimeoutSettingsService.clear(userId),
|
||||||
this.vaultFilterService.clear(),
|
this.vaultFilterService.clear(),
|
||||||
this.biometricStateService.logout(userId),
|
this.biometricStateService.logout(userId),
|
||||||
|
this.searchService.clearIndex(),
|
||||||
/* We intentionally do not clear:
|
/* We intentionally do not clear:
|
||||||
* - autofillSettingsService
|
* - autofillSettingsService
|
||||||
* - badgeSettingsService
|
* - badgeSettingsService
|
||||||
@@ -1181,13 +1182,8 @@ export default class MainBackground {
|
|||||||
//Needs to be checked before state is cleaned
|
//Needs to be checked before state is cleaned
|
||||||
const needStorageReseed = await this.needsStorageReseed();
|
const needStorageReseed = await this.needsStorageReseed();
|
||||||
|
|
||||||
const currentUserId = await this.stateService.getUserId();
|
|
||||||
const newActiveUser = await this.stateService.clean({ userId: userId });
|
const newActiveUser = await this.stateService.clean({ userId: userId });
|
||||||
|
|
||||||
if (userId == null || userId === currentUserId) {
|
|
||||||
await this.searchService.clearIndex();
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.stateEventRunnerService.handleEvent("logout", userId);
|
await this.stateEventRunnerService.handleEvent("logout", userId);
|
||||||
|
|
||||||
if (newActiveUser != null) {
|
if (newActiveUser != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user