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:
YashRE42
2020-04-18 22:23:45 +05:30
committed by Tim Abbott
parent ee68ac9957
commit a27e6aa673
2 changed files with 2 additions and 2 deletions

View File

@@ -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});