1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

refresh list if attachments change

This commit is contained in:
Kyle Spearrin
2018-06-09 13:29:30 -04:00
parent fbc756c6e3
commit 5ecb26b032
2 changed files with 9 additions and 2 deletions

2
jslib

Submodule jslib updated: fe3a878542...7b05416d55

View File

@@ -136,9 +136,16 @@ export class VaultComponent implements OnInit {
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;
});
}