mirror of
https://github.com/bitwarden/browser
synced 2026-02-01 01:03:39 +00:00
fix update issue
This commit is contained in:
@@ -2,7 +2,6 @@ import { inject, Injectable, NgZone } from "@angular/core";
|
||||
import { toObservable } from "@angular/core/rxjs-interop";
|
||||
import {
|
||||
combineLatest,
|
||||
concatMap,
|
||||
distinctUntilChanged,
|
||||
distinctUntilKeyChanged,
|
||||
filter,
|
||||
@@ -240,14 +239,12 @@ export class VaultPopupItemsService {
|
||||
* List of all remaining ciphers that are not currently suggested for autofill or marked as favorite.
|
||||
* Ciphers are sorted by name.
|
||||
*/
|
||||
remainingCiphers$: Observable<PopupCipherViewLike[]> = this.favoriteCiphers$.pipe(
|
||||
concatMap(
|
||||
(
|
||||
favoriteCiphers, // concatMap->of is used to make withLatestFrom lazy to avoid race conditions with autoFillCiphers$
|
||||
) =>
|
||||
of(favoriteCiphers).pipe(withLatestFrom(this._filteredCipherList$, this.autoFillCiphers$)),
|
||||
),
|
||||
map(([favoriteCiphers, ciphers, autoFillCiphers]) =>
|
||||
remainingCiphers$ = combineLatest([
|
||||
this._filteredCipherList$,
|
||||
this.autoFillCiphers$,
|
||||
this.favoriteCiphers$,
|
||||
]).pipe(
|
||||
map(([ciphers, autoFillCiphers, favoriteCiphers]) =>
|
||||
ciphers.filter(
|
||||
(cipher) => !autoFillCiphers.includes(cipher) && !favoriteCiphers.includes(cipher),
|
||||
),
|
||||
@@ -404,7 +401,11 @@ const waitUntilSync = <T>(syncService: SyncService): MonoTypeOperatorFunction<T>
|
||||
return waitUntil(syncService.activeUserLastSync$().pipe(filter((lastSync) => lastSync != null)));
|
||||
};
|
||||
|
||||
const ciphersEqualByIdAndOrder = (a: PopupCipherViewLike[], b: PopupCipherViewLike[]): boolean => {
|
||||
const ciphersEqualByIdAndOrder = (
|
||||
a: PopupCipherViewLike[],
|
||||
b: PopupCipherViewLike[],
|
||||
context?: string,
|
||||
): boolean => {
|
||||
if (a === b) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user