From b76cdbe2cdd1056dbe43986234063917634e80d2 Mon Sep 17 00:00:00 2001 From: jaasen-livefront Date: Fri, 14 Feb 2025 11:56:35 -0800 Subject: [PATCH] sync folder on save --- apps/desktop/src/vault/app/vault/vault.component.ts | 2 +- libs/angular/src/vault/components/view.component.ts | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/apps/desktop/src/vault/app/vault/vault.component.ts b/apps/desktop/src/vault/app/vault/vault.component.ts index b0ec950678d..6f844a7bf51 100644 --- a/apps/desktop/src/vault/app/vault/vault.component.ts +++ b/apps/desktop/src/vault/app/vault/vault.component.ts @@ -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(); } diff --git a/libs/angular/src/vault/components/view.component.ts b/libs/angular/src/vault/components/view.component.ts index 1ba6feb6dc9..3738a0450d9 100644 --- a/libs/angular/src/vault/components/view.component.ts +++ b/libs/angular/src/vault/components/view.component.ts @@ -141,7 +141,10 @@ 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( @@ -149,14 +152,6 @@ export class ViewComponent implements OnDestroy, OnInit { 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),