mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
[PM-5757] Update local collection data when a collection is updated (#7940)
* [PM-5757] Update local data when a collection is updated * [PM-5757] Use defer() for collections re-evaluate the promise on refresh$
This commit is contained in:
@@ -11,6 +11,7 @@ import { ActivatedRoute, Params, Router } from "@angular/router";
|
||||
import {
|
||||
BehaviorSubject,
|
||||
combineLatest,
|
||||
defer,
|
||||
firstValueFrom,
|
||||
lastValueFrom,
|
||||
Observable,
|
||||
@@ -250,7 +251,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
|
||||
const allCollectionsWithoutUnassigned$ = combineLatest([
|
||||
organizationId$.pipe(switchMap((orgId) => this.collectionAdminService.getAll(orgId))),
|
||||
this.collectionService.getAllDecrypted(),
|
||||
defer(() => this.collectionService.getAllDecrypted()),
|
||||
]).pipe(
|
||||
map(([adminCollections, syncCollections]) => {
|
||||
const syncCollectionDict = Object.fromEntries(syncCollections.map((c) => [c.id, c]));
|
||||
|
||||
Reference in New Issue
Block a user