Merge branch '495-send-button-should-be-disabled-once-it-is-clicked-for-sending-the-files' into 'dev'

Disable send button correctly while sending attachments. Also fix cancel.

See merge request keanuapp/keanuapp-weblite!220
This commit is contained in:
N Pex 2023-08-07 07:55:49 +00:00
commit 31b7c4ed26

View file

@ -1234,6 +1234,7 @@ export default {
})
const promises = inputFiles.map(inputFile => util.sendImage(this.$matrix.matrixClient, this.roomId, inputFile, this.onUploadProgress));
this.currentSendOperation = promises;
Promise.all(promises).then(() => {
this.currentSendOperation = null;
@ -1260,7 +1261,7 @@ export default {
cancelSendAttachment() {
this.$refs.attachment.value = null;
if (this.currentSendOperation) {
this.currentSendOperation.abort();
this.currentSendOperation.forEach(o => o.abort());
}
this.currentSendOperation = null;
this.currentFileInputs = null;