Skip to content

Commit

Permalink
sync folder on save
Browse files Browse the repository at this point in the history
  • Loading branch information
jaasen-livefront committed Feb 14, 2025
1 parent dfd9dff commit b76cdbe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/desktop/src/vault/app/vault/vault.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ export class VaultComponent implements OnInit, OnDestroy {
this.action = "view";
await this.vaultItemsComponent.refresh();
await this.cipherService.clearCache(this.activeUserId);
await this.viewComponent.fetchCipher();
await this.viewComponent.load();
this.go();
}

Expand Down
13 changes: 4 additions & 9 deletions libs/angular/src/vault/components/view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,17 @@ export class ViewComponent implements OnDestroy, OnInit {
this.cleanUp();
}

async fetchCipher() {
async load() {
this.cleanUp();

// Grab individual cipher from `cipherViews$` for the most up-to-date information
const activeUserId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
this.cipher = await firstValueFrom(
this.cipherService.cipherViews$(activeUserId).pipe(
map((ciphers) => ciphers?.find((c) => c.id === this.cipherId)),
filter((cipher) => !!cipher),
),
);
}

async load() {
this.cleanUp();

const activeUserId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
// Grab individual cipher from `cipherViews$` for the most up-to-date information
await this.fetchCipher();

this.canAccessPremium = await firstValueFrom(
this.billingAccountProfileStateService.hasPremiumFromAnySource$(activeUserId),
Expand Down

0 comments on commit b76cdbe

Please sign in to comment.