From 5d137e8b2e8043adca7575763bec239d764a0e36 Mon Sep 17 00:00:00 2001 From: N-Pex Date: Mon, 7 Aug 2023 09:53:19 +0200 Subject: [PATCH] Disable send button correctly while sending attachments. Also fix cancel. --- src/components/Chat.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Chat.vue b/src/components/Chat.vue index c7bf791..6f294a2 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -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;