scheduled_messages: Show realm_empty_topic_display_name for topic="".

This commit adds support to display `realm_empty_topic_display_name`
value in the scheduled messages overlay UI for topics having the
actual value of empty string.
This commit is contained in:
Prakhar Pratyush
2025-01-09 22:14:35 +05:30
committed by Tim Abbott
parent e3ce4c5766
commit d45a52c11d
2 changed files with 6 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ import * as stream_color from "./stream_color.ts";
import * as stream_data from "./stream_data.ts";
import * as sub_store from "./sub_store.ts";
import * as timerender from "./timerender.ts";
import * as util from "./util.ts";
type ScheduledMessageRenderContext = ScheduledMessage &
(
@@ -25,6 +26,8 @@ type ScheduledMessageRenderContext = ScheduledMessage &
stream_id: number;
stream_name: string;
stream_privacy_icon_color: string;
topic_display_name: string;
is_empty_string_topic: boolean;
}
| {
is_stream: false;
@@ -107,6 +110,8 @@ function format(
recipient_bar_color,
stream_privacy_icon_color,
formatted_send_at_time,
topic_display_name: util.get_final_topic_display_name(msg.topic),
is_empty_string_topic: msg.topic === "",
};
} else {
const recipients = people.get_recipients(msg.to.join(","));

View File

@@ -13,7 +13,7 @@
<span class="stream_topic_separator"><i class="zulip-icon zulip-icon-chevron-right"></i></span>
<span class="stream_topic">
<div class="message_label_clickable narrows_by_topic">
<span>{{topic}}</span>
<span {{#if is_empty_string_topic}}class="empty-topic-display"{{/if}}>{{topic_display_name}}</span>
</div>
</span>
<span class="recipient_bar_controls"></span>