mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
clear search index on lock
This commit is contained in:
@@ -7,6 +7,7 @@ import { FolderService } from '../abstractions/folder.service';
|
|||||||
import { LockService as LockServiceAbstraction } from '../abstractions/lock.service';
|
import { LockService as LockServiceAbstraction } from '../abstractions/lock.service';
|
||||||
import { MessagingService } from '../abstractions/messaging.service';
|
import { MessagingService } from '../abstractions/messaging.service';
|
||||||
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
|
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
|
||||||
|
import { SearchService } from '../abstractions/search.service';
|
||||||
import { StorageService } from '../abstractions/storage.service';
|
import { StorageService } from '../abstractions/storage.service';
|
||||||
|
|
||||||
export class LockService implements LockServiceAbstraction {
|
export class LockService implements LockServiceAbstraction {
|
||||||
@@ -15,7 +16,8 @@ export class LockService implements LockServiceAbstraction {
|
|||||||
constructor(private cipherService: CipherService, private folderService: FolderService,
|
constructor(private cipherService: CipherService, private folderService: FolderService,
|
||||||
private collectionService: CollectionService, private cryptoService: CryptoService,
|
private collectionService: CollectionService, private cryptoService: CryptoService,
|
||||||
private platformUtilsService: PlatformUtilsService, private storageService: StorageService,
|
private platformUtilsService: PlatformUtilsService, private storageService: StorageService,
|
||||||
private messagingService: MessagingService, private lockedCallback: () => Promise<void>) {
|
private messagingService: MessagingService, private searchService: SearchService,
|
||||||
|
private lockedCallback: () => Promise<void>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
init(checkOnInterval: boolean) {
|
init(checkOnInterval: boolean) {
|
||||||
@@ -74,6 +76,7 @@ export class LockService implements LockServiceAbstraction {
|
|||||||
this.folderService.clearCache();
|
this.folderService.clearCache();
|
||||||
this.cipherService.clearCache();
|
this.cipherService.clearCache();
|
||||||
this.collectionService.clearCache();
|
this.collectionService.clearCache();
|
||||||
|
this.searchService.clearIndex();
|
||||||
this.messagingService.send('locked');
|
this.messagingService.send('locked');
|
||||||
if (this.lockedCallback != null) {
|
if (this.lockedCallback != null) {
|
||||||
await this.lockedCallback();
|
await this.lockedCallback();
|
||||||
|
|||||||
Reference in New Issue
Block a user