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.

confirm_merge_topics: Show realm_empty_topic_display_name for topic="".

Prakhar Pratyush79da2e38c57c
diff --git a/web/src/message_edit.ts b/web/src/message_edit.ts
index 763c4ac1be4..9e1e0357f6e 100644
--- a/web/src/message_edit.ts
+++ b/web/src/message_edit.ts
@@ -981,7 +981,8 @@ export function try_save_inline_topic_edit($row: JQuery): void {
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Merge with another topic?"}),
html_body: render_confirm_merge_topics_with_rename({
- topic_name: new_topic,
+ topic_display_name: util.get_final_topic_display_name(new_topic),
+ is_empty_string_topic: new_topic === "",
}),
on_click() {
do_save_inline_topic_edit($row, message, new_topic);
diff --git a/web/templates/confirm_dialog/confirm_merge_topics_with_rename.hbs b/web/templates/confirm_dialog/confirm_merge_topics_with_rename.hbs
index a62329f9efc..81969e981af 100644
--- a/web/templates/confirm_dialog/confirm_merge_topics_with_rename.hbs
+++ b/web/templates/confirm_dialog/confirm_merge_topics_with_rename.hbs
@@ -1,7 +1,7 @@
<p>
{{#tr}}
- The topic <z-topic-name>{topic_name}</z-topic-name> already exists in this channel.
+ The topic <z-topic-name>{topic_display_name}</z-topic-name> already exists in this channel.
Are you sure you want to combine messages from these topics? This cannot be undone.
- {{#*inline "z-topic-name"}}<strong class="white-space-preserve-wrap">{{> @partial-block}}</strong>{{/inline}}
+ {{#*inline "z-topic-name"}}<strong class="white-space-preserve-wrap {{#if is_empty_string_topic}}empty-topic-display{{/if}}">{{> @partial-block}}</strong>{{/inline}}
{{/tr}}
</p>