From 9402b59a2939da8084631f8f64f9763e0174e317 Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Thu, 9 Jan 2025 22:37:14 +0530 Subject: [PATCH] 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. --- web/src/starred_messages_ui.ts | 4 +++- web/templates/stream_topic_widget.hbs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/starred_messages_ui.ts b/web/src/starred_messages_ui.ts index df9bbe7356..f6713c9684 100644 --- a/web/src/starred_messages_ui.ts +++ b/web/src/starred_messages_ui.ts @@ -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({ diff --git a/web/templates/stream_topic_widget.hbs b/web/templates/stream_topic_widget.hbs index 3e3b8d9462..f21b47e94f 100644 --- a/web/templates/stream_topic_widget.hbs +++ b/web/templates/stream_topic_widget.hbs @@ -1,3 +1,3 @@ - {{stream_name}} > {{topic}} + {{stream_name}} > {{topic_display_name}}