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

This commit is contained in:
N-Pex 2023-08-07 09:53:19 +02:00
parent 59b306ad3c
commit 5d137e8b2e

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;