1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00:00

Fixed stale data after moving anb item to a collection (#15553)

This commit is contained in:
SmithThe4th
2025-07-09 20:55:16 -04:00
committed by GitHub
parent dac7014cf1
commit ec015bd253

View File

@@ -637,7 +637,15 @@ export class VaultV2Component implements OnInit, OnDestroy, CopyClickListener {
const result = await lastValueFrom(dialog.closed); const result = await lastValueFrom(dialog.closed);
if (result === CollectionAssignmentResult.Saved) { 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);
} }
} }