mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
empty_feed_notice: Add support for empty string topic.
Earlier, we were not showing `realm_empty_topic_display_name` value in the empty_feed_notice.
This commit is contained in:
committed by
Tim Abbott
parent
82646c4d96
commit
22efac5a77
@@ -82,8 +82,9 @@ function retrieve_search_query_data(): SearchData {
|
||||
const stream_name = stream_data.get_valid_sub_by_id_string(stream_id).name;
|
||||
search_string_result.stream_query = stream_name;
|
||||
}
|
||||
if (topic) {
|
||||
search_string_result.topic_query = topic;
|
||||
if (topic !== undefined) {
|
||||
search_string_result.topic_query = util.get_final_topic_display_name(topic);
|
||||
search_string_result.is_empty_string_topic = topic === "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ export type SearchData = {
|
||||
has_stop_word: boolean;
|
||||
stream_query?: string;
|
||||
topic_query?: string;
|
||||
is_empty_string_topic?: boolean;
|
||||
};
|
||||
|
||||
export type NarrowBannerData = {
|
||||
|
||||
@@ -7,8 +7,12 @@
|
||||
<span>channel: {{search_data.stream_query}}</span>
|
||||
{{/if}}
|
||||
{{#if search_data.topic_query}}
|
||||
{{#if search_data.is_empty_string_topic}}
|
||||
<span>topic: <span class="empty-topic-display">{{search_data.topic_query}}</span></span>
|
||||
{{else}}
|
||||
<span>topic: {{search_data.topic_query}}</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#each search_data.query_words}}
|
||||
{{#if is_stop_word}}
|
||||
<del>{{query_word}}</del>
|
||||
|
||||
Reference in New Issue
Block a user