From 6d2441041bf0d417df371caf07f1ab03e2df4f88 Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Mon, 11 Apr 2022 11:50:06 +1000 Subject: [PATCH] DEV: Minor in-progress-uploads refactor (#16430) These calls were missed in ac672cfcc6726b9309904857dd246f5ee54b20a8 --- .../discourse/app/mixins/uppy-upload.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/discourse/app/mixins/uppy-upload.js b/app/assets/javascripts/discourse/app/mixins/uppy-upload.js index 55258c9afb4..0807f98f40e 100644 --- a/app/assets/javascripts/discourse/app/mixins/uppy-upload.js +++ b/app/assets/javascripts/discourse/app/mixins/uppy-upload.js @@ -72,10 +72,7 @@ export default Mixin.create(UppyS3Multipart, ExtendableUploader, { }); this.set("allowMultipleFiles", this.fileInputEl.multiple); this.set("inProgressUploads", []); - this.appEvents.trigger( - `upload-mixin:${this.id}:in-progress-uploads`, - this.inProgressUploads - ); + this._triggerInProgressUploadsEvent(); this._bindFileInputChange(); @@ -185,10 +182,7 @@ export default Mixin.create(UppyS3Multipart, ExtendableUploader, { processing: false, }) ); - this.appEvents.trigger( - `upload-mixin:${this.id}:in-progress-uploads`, - this.inProgressUploads - ); + this._triggerInProgressUploadsEvent(); }); }); @@ -475,10 +469,7 @@ export default Mixin.create(UppyS3Multipart, ExtendableUploader, { "inProgressUploads", this.inProgressUploads.filter((upl) => upl.id !== fileId) ); - this.appEvents.trigger( - `upload-mixin:${this.id}:in-progress-uploads`, - this.inProgressUploads - ); + this._triggerInProgressUploadsEvent(); }, // target must be provided as a DOM element, however the