Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

inline_topic_edit: Remove overflowing error text on saving empty topic.

Sayam Samalfaa08b6000f4
diff --git a/web/src/message_edit.ts b/web/src/message_edit.ts
index d75d7f50d50..d6c431167b3 100644
--- a/web/src/message_edit.ts
+++ b/web/src/message_edit.ts
@@ -1011,7 +1011,6 @@ export function try_save_inline_topic_edit($row: JQuery): void {
}
export function do_save_inline_topic_edit($row: JQuery, message: Message, new_topic: string): void {
- const msg_list = message_lists.current;
show_topic_edit_spinner($row);
if (message.locally_echoed) {
@@ -1074,13 +1073,6 @@ export function do_save_inline_topic_edit($row: JQuery, message: Message, new_to
return;
}
loading.destroy_indicator($spinner);
- if (msg_list === message_lists.current) {
- const message = channel.xhr_error_message(
- $t({defaultMessage: "Error saving edit"}),
- xhr,
- );
- $row.find(".edit_error").text(message).css("display", "inline-block");
- }
},
});
}
diff --git a/web/templates/topic_edit_form.hbs b/web/templates/topic_edit_form.hbs
index 28691800fd3..6f96b7c926a 100644
--- a/web/templates/topic_edit_form.hbs
+++ b/web/templates/topic_edit_form.hbs
@@ -6,6 +6,5 @@
{{#unless realm_mandatory_topics}}placeholder="{{empty_string_topic_display_name}}"{{/unless}} />
{{> components/icon_button squared=true custom_classes="topic_edit_save tippy-zulip-delayed-tooltip" icon="check" intent="brand" data-tooltip-template-id="save-button-tooltip-template" }}
{{> components/icon_button squared=true custom_classes="topic_edit_cancel tippy-zulip-delayed-tooltip" icon="circle-x" intent="neutral" data-tooltip-template-id="cancel-button-tooltip-template" }}
- <div class="alert alert-error edit_error" style="display: none"></div>
<div class="topic_edit_spinner"></div>
</form>