mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
upload: Centralize config object construction.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
d9f05121d9
commit
25b29b5cd4
@@ -578,10 +578,7 @@ function start_edit_with_content($row, content, edit_box_open_callback) {
|
||||
edit_box_open_callback();
|
||||
}
|
||||
const row_id = rows.id($row);
|
||||
upload.setup_upload({
|
||||
mode: "edit",
|
||||
row: row_id,
|
||||
});
|
||||
upload.setup_upload(upload.edit_config(row_id));
|
||||
}
|
||||
|
||||
export function start($row, edit_box_open_callback) {
|
||||
@@ -795,7 +792,7 @@ export function end_message_row_edit($row) {
|
||||
const row_id = rows.id($row);
|
||||
|
||||
// Clean up the upload handler
|
||||
upload.deactivate_upload({mode: "edit", row: row_id});
|
||||
upload.deactivate_upload(upload.edit_config(row_id));
|
||||
|
||||
const message = message_lists.current.get(row_id);
|
||||
if (message !== undefined && currently_editing_messages.has(message.id)) {
|
||||
|
||||
Reference in New Issue
Block a user