|
|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
// FIXME: Update this file to be type safe and remove this and next line
|
|
|
|
|
// @ts-strict-ignore
|
|
|
|
|
import { combineLatest, firstValueFrom, map, Observable, of, switchMap } from "rxjs";
|
|
|
|
|
import { combineLatest, firstValueFrom, map, Observable, of, shareReplay, switchMap } from "rxjs";
|
|
|
|
|
import { Jsonify } from "type-fest";
|
|
|
|
|
|
|
|
|
|
import { EncryptService } from "@bitwarden/common/key-management/crypto/abstractions/encrypt.service";
|
|
|
|
|
@ -8,10 +8,10 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|
|
|
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
|
|
|
|
import {
|
|
|
|
|
ActiveUserState,
|
|
|
|
|
StateProvider,
|
|
|
|
|
COLLECTION_DATA,
|
|
|
|
|
DeriveDefinition,
|
|
|
|
|
DerivedState,
|
|
|
|
|
StateProvider,
|
|
|
|
|
UserKeyDefinition,
|
|
|
|
|
} from "@bitwarden/common/platform/state";
|
|
|
|
|
import { CollectionId, OrganizationId, UserId } from "@bitwarden/common/types/guid";
|
|
|
|
|
@ -84,6 +84,7 @@ export class DefaultCollectionService implements CollectionService {
|
|
|
|
|
switchMap(([userId, collectionData]) =>
|
|
|
|
|
combineLatest([of(collectionData), this.keyService.orgKeys$(userId)]),
|
|
|
|
|
),
|
|
|
|
|
shareReplay({ refCount: false, bufferSize: 1 }),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
this.decryptedCollectionDataState = this.stateProvider.getDerived(
|
|
|
|
|
|