mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
Fixed stale data after moving anb item to a collection (#15553)
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user