mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 17:36:27 +00:00
message_edit: Show inline topic edit spinner only via save handler.
This commit delegates the responsibility of displaying a spinner to the "save_inline_topic_edit" function.
This commit is contained in:
@@ -251,7 +251,6 @@ exports.initialize = function () {
|
||||
});
|
||||
$("body").on("click", ".topic_edit_save", function (e) {
|
||||
const recipient_row = $(this).closest(".recipient_row");
|
||||
message_edit.show_topic_edit_spinner(recipient_row);
|
||||
message_edit.save_inline_topic_edit(recipient_row);
|
||||
e.stopPropagation();
|
||||
popovers.hide_all();
|
||||
|
||||
@@ -209,7 +209,6 @@ function handle_inline_topic_edit_keydown(e) {
|
||||
switch (code) {
|
||||
case 13: // Handle enter key in the recipient bar/inline topic edit form
|
||||
row = $(e.target).closest(".recipient_row");
|
||||
exports.show_topic_edit_spinner(row);
|
||||
exports.save_inline_topic_edit(row);
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
@@ -519,6 +518,8 @@ exports.save_inline_topic_edit = function (row) {
|
||||
return;
|
||||
}
|
||||
|
||||
exports.show_topic_edit_spinner(row);
|
||||
|
||||
if (message.locally_echoed) {
|
||||
if (topic_changed) {
|
||||
echo.edit_locally(message, {new_topic: new_topic});
|
||||
|
||||
Reference in New Issue
Block a user