From ec015bd253aef5d9f455df7fa215379ac945075d Mon Sep 17 00:00:00 2001 From: SmithThe4th Date: Wed, 9 Jul 2025 20:55:16 -0400 Subject: [PATCH] Fixed stale data after moving anb item to a collection (#15553) --- apps/desktop/src/vault/app/vault/vault-v2.component.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/vault/app/vault/vault-v2.component.ts b/apps/desktop/src/vault/app/vault/vault-v2.component.ts index 2d741944071..2142b5e7a4b 100644 --- a/apps/desktop/src/vault/app/vault/vault-v2.component.ts +++ b/apps/desktop/src/vault/app/vault/vault-v2.component.ts @@ -637,7 +637,15 @@ export class VaultV2Component implements OnInit, OnDestroy, CopyClickListener { const result = await lastValueFrom(dialog.closed); if (result === CollectionAssignmentResult.Saved) { - await this.savedCipher(cipher); + const updatedCipher = await firstValueFrom( + // Fetch the updated cipher from the service + this.cipherService.cipherViews$(this.activeUserId as UserId).pipe( + filter((ciphers) => ciphers != null), + map((ciphers) => ciphers!.find((c) => c.id === cipher.id)), + filter((foundCipher) => foundCipher != null), + ), + ); + await this.savedCipher(updatedCipher); } }