mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
refresh list if attachments change
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 4c083eeb92...7b05416d55
@@ -334,9 +334,16 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
const childComponent = this.modal.show<AttachmentsComponent>(AttachmentsComponent, this.attachmentsModalRef);
|
||||
|
||||
childComponent.cipherId = cipher.id;
|
||||
let madeAttachmentChanges = false;
|
||||
childComponent.onUploadedAttachment.subscribe(() => madeAttachmentChanges = true);
|
||||
childComponent.onDeletedAttachment.subscribe(() => madeAttachmentChanges = true);
|
||||
|
||||
this.modal.onClosed.subscribe(() => {
|
||||
this.modal.onClosed.subscribe(async () => {
|
||||
this.modal = null;
|
||||
if (madeAttachmentChanges) {
|
||||
await this.ciphersComponent.refresh();
|
||||
}
|
||||
madeAttachmentChanges = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user