Disable send button correctly while sending attachments. Also fix cancel.
This commit is contained in:
parent
59b306ad3c
commit
5d137e8b2e
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue