FIX: Composer Processing/Uploading status not clearing on cancel and trash (#14050)

FIX: Composer Processing/Uploading status not clearing on cancel and trash (#14050)

When the composer reply is cancelled and the draft is trashed, the isUploading and isProcessing statuses were not being reset, so when the composer was opened again the Uploading… or Processing… message still showed even when the uploads had been cancelled correctly.

The regular composer-upload mixin suffered the same problem as the uppy one, where the Processing/Uploading message was not reset when a reply was cancelled and the draft destroyed.

diff --git a/app/assets/javascripts/discourse/app/mixins/composer-upload-uppy.js b/app/assets/javascripts/discourse/app/mixins/composer-upload-uppy.js
index af1a985..961f690 100644
--- a/app/assets/javascripts/discourse/app/mixins/composer-upload-uppy.js
+++ b/app/assets/javascripts/discourse/app/mixins/composer-upload-uppy.js
@@ -60,6 +60,8 @@ export default Mixin.create({"composer:add-files", this._addFiles.bind(this));
+    this._reset();
     if (this._uppyInstance) {
       this._uppyInstance = null;
diff --git a/app/assets/javascripts/discourse/app/mixins/composer-upload.js b/app/assets/javascripts/discourse/app/mixins/composer-upload.js
index 72ebf67..5dbbbb9 100644
--- a/app/assets/javascripts/discourse/app/mixins/composer-upload.js
+++ b/app/assets/javascripts/discourse/app/mixins/composer-upload.js
@@ -129,6 +129,13 @@ export default Mixin.create({
     const $element = $(this.element);
+    this.setProperties({
+      uploadProgress: 0,
+      isUploading: false,
+      isProcessingUpload: false,
+      isCancellable: false,
+    });
     $.blueimp.fileupload.prototype.processActions = this.uploadProcessorActions;

GitHub sha: f9e877dbff4aa79c3ef9fce3c8d25cfd084f2686

This commit appears in #14050 which was approved by lis2. It was merged by martin.