mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 01:47:41 +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) {
|
$("body").on("click", ".topic_edit_save", function (e) {
|
||||||
const recipient_row = $(this).closest(".recipient_row");
|
const recipient_row = $(this).closest(".recipient_row");
|
||||||
message_edit.show_topic_edit_spinner(recipient_row);
|
|
||||||
message_edit.save_inline_topic_edit(recipient_row);
|
message_edit.save_inline_topic_edit(recipient_row);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
popovers.hide_all();
|
popovers.hide_all();
|
||||||
|
|||||||
@@ -209,7 +209,6 @@ function handle_inline_topic_edit_keydown(e) {
|
|||||||
switch (code) {
|
switch (code) {
|
||||||
case 13: // Handle enter key in the recipient bar/inline topic edit form
|
case 13: // Handle enter key in the recipient bar/inline topic edit form
|
||||||
row = $(e.target).closest(".recipient_row");
|
row = $(e.target).closest(".recipient_row");
|
||||||
exports.show_topic_edit_spinner(row);
|
|
||||||
exports.save_inline_topic_edit(row);
|
exports.save_inline_topic_edit(row);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -519,6 +518,8 @@ exports.save_inline_topic_edit = function (row) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.show_topic_edit_spinner(row);
|
||||||
|
|
||||||
if (message.locally_echoed) {
|
if (message.locally_echoed) {
|
||||||
if (topic_changed) {
|
if (topic_changed) {
|
||||||
echo.edit_locally(message, {new_topic: new_topic});
|
echo.edit_locally(message, {new_topic: new_topic});
|
||||||
|
|||||||
Reference in New Issue
Block a user