mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-21279] Cipher for url speedup (#14684)
* Use `perUserCache$` for `getAllDecryptedForUrl` * Fix loads before first lock * Filter out null ciphers
This commit is contained in:
@@ -519,8 +519,15 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
includeOtherTypes?: CipherType[],
|
||||
defaultMatch: UriMatchStrategySetting = null,
|
||||
): Promise<CipherView[]> {
|
||||
const ciphers = await this.getAllDecrypted(userId);
|
||||
return await this.filterCiphersForUrl(ciphers, url, includeOtherTypes, defaultMatch);
|
||||
return await firstValueFrom(
|
||||
this.cipherViews$(userId).pipe(
|
||||
filter((c) => c != null),
|
||||
switchMap(
|
||||
async (ciphers) =>
|
||||
await this.filterCiphersForUrl(ciphers, url, includeOtherTypes, defaultMatch),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
async filterCiphersForUrl(
|
||||
|
||||
Reference in New Issue
Block a user