unstar_topic_messages: Show realm_empty_topic_display_name for topic="".

This commit adds support to display `realm_empty_topic_display_name`
value in the confirm dialog for unstar all messages in topic,
for topics having the actual value of empty string.
This commit is contained in:
Prakhar Pratyush
2025-01-09 22:37:14 +05:30
committed by Tim Abbott
parent d45a52c11d
commit 9402b59a29
2 changed files with 4 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ import * as starred_messages from "./starred_messages.ts";
import * as sub_store from "./sub_store.ts";
import * as unread_ops from "./unread_ops.ts";
import {user_settings} from "./user_settings.ts";
import * as util from "./util.ts";
export function toggle_starred_and_update_server(message: Message): void {
if (message.locally_echoed) {
@@ -92,7 +93,8 @@ export function confirm_unstar_all_messages_in_topic(stream_id: number, topic: s
const html_body = render_confirm_unstar_all_messages_in_topic({
stream_name,
topic,
topic_display_name: util.get_final_topic_display_name(topic),
is_empty_string_topic: topic === "",
});
confirm_dialog.launch({

View File

@@ -1,3 +1,3 @@
<strong>
<span class="stream">{{stream_name}}</span> &gt; <span class="topic white-space-preserve-wrap">{{topic}}</span>
<span class="stream">{{stream_name}}</span> &gt; <span class="topic white-space-preserve-wrap {{#if is_empty_string_topic}}empty-topic-display{{/if}}">{{topic_display_name}}</span>
</strong>