mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
[PM-24261] Fix infinite loading on members tab (#15833)
Use combineLatest instead of withLatestFrom to ensure the observable always emits whenever any value is updated
This commit is contained in:
@@ -13,7 +13,6 @@ import {
|
|||||||
Observable,
|
Observable,
|
||||||
shareReplay,
|
shareReplay,
|
||||||
switchMap,
|
switchMap,
|
||||||
withLatestFrom,
|
|
||||||
tap,
|
tap,
|
||||||
} from "rxjs";
|
} from "rxjs";
|
||||||
|
|
||||||
@@ -310,10 +309,13 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const decryptedCollections$ = this.accountService.activeAccount$.pipe(
|
const decryptedCollections$ = combineLatest([
|
||||||
|
this.accountService.activeAccount$.pipe(
|
||||||
getUserId,
|
getUserId,
|
||||||
switchMap((userId) => this.keyService.orgKeys$(userId)),
|
switchMap((userId) => this.keyService.orgKeys$(userId)),
|
||||||
withLatestFrom(response),
|
),
|
||||||
|
response,
|
||||||
|
]).pipe(
|
||||||
switchMap(([orgKeys, collections]) =>
|
switchMap(([orgKeys, collections]) =>
|
||||||
this.collectionService.decryptMany$(collections, orgKeys),
|
this.collectionService.decryptMany$(collections, orgKeys),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user