mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
uploads: Improve abstraction of upload.js by removing object exports.
The `upload_objects_by_message_edit_row` map object was being exported to handle the uploads during the editing of a message. To improve the abstraction, we move the logic being used to access `upload_objects_by_message_edit_row` and itself into `upload.js`. Similarly, the `compose_upload_object` constant which was being exported to handle the cancelling of compose uploads. This commit removes this export and instead defines a new method `compose_upload_cancel` to handle the same.
This commit is contained in:
@@ -508,10 +508,8 @@ test_ui("initialize", ({override}) => {
|
||||
realm.max_file_upload_size_mib = 512;
|
||||
|
||||
let uppy_cancel_all_called = false;
|
||||
override(upload, "compose_upload_object", {
|
||||
cancelAll() {
|
||||
uppy_cancel_all_called = true;
|
||||
},
|
||||
override(upload, "compose_upload_cancel", () => {
|
||||
uppy_cancel_all_called = true;
|
||||
});
|
||||
override(upload, "feature_check", noop);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user