mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
[PM-12045] search service activeuserstate (#13035)
* removing activeuserstate from search service
This commit is contained in:
@@ -165,9 +165,9 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
}
|
||||
if (this.searchService != null) {
|
||||
if (value == null) {
|
||||
await this.searchService.clearIndex();
|
||||
await this.searchService.clearIndex(userId);
|
||||
} else {
|
||||
await this.searchService.indexCiphers(value);
|
||||
await this.searchService.indexCiphers(userId, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -480,9 +480,9 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
private async reindexCiphers(userId: UserId) {
|
||||
const reindexRequired =
|
||||
this.searchService != null &&
|
||||
((await firstValueFrom(this.searchService.indexedEntityId$)) ?? userId) !== userId;
|
||||
((await firstValueFrom(this.searchService.indexedEntityId$(userId))) ?? userId) !== userId;
|
||||
if (reindexRequired) {
|
||||
await this.searchService.indexCiphers(await this.getDecryptedCiphers(userId), userId);
|
||||
await this.searchService.indexCiphers(userId, await this.getDecryptedCiphers(userId), userId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user