No propagate, fix 'attachment save' cancel

* Quote: Ensure that clicks don't propagate to parent
* Attachment Save: Check for null; returned if user cancels out
This commit is contained in:
Scott Nonnenberg 2020-01-22 11:34:36 -08:00 committed by Ken Powers
parent 95d393ee89
commit bfa76b05d2
3 changed files with 29 additions and 7 deletions

View file

@ -1804,7 +1804,10 @@
saveAttachmentToDisk,
timestamp,
});
this.showToast(Whisper.FileSavedToast, { fullPath });
if (fullPath) {
this.showToast(Whisper.FileSavedToast, { fullPath });
}
};
const onItemClick = async ({ message, attachment, type }) => {
@ -2001,7 +2004,10 @@
saveAttachmentToDisk,
timestamp,
});
this.showToast(Whisper.FileSavedToast, { fullPath });
if (fullPath) {
this.showToast(Whisper.FileSavedToast, { fullPath });
}
},
async displayTapToViewMessage(messageId) {
@ -2205,7 +2211,10 @@
saveAttachmentToDisk,
timestamp: options.message.get('sent_at'),
});
this.showToast(Whisper.FileSavedToast, { fullPath });
if (fullPath) {
this.showToast(Whisper.FileSavedToast, { fullPath });
}
};
const props = {