Skip to content

Commit

Permalink
user_topic_settings: Show realm_empty_topic_display_name for topic="".
Browse files Browse the repository at this point in the history
This commit adds support to display `realm_empty_topic_display_name`
value in the SETTINGS/TOPICS table for topics having the actual
value of empty string.
  • Loading branch information
prakhar1144 authored and timabbott committed Jan 10, 2025
1 parent 9402b59 commit 97e8ed5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions web/src/settings_user_topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as scroll_util from "./scroll_util.ts";
import * as settings_config from "./settings_config.ts";
import * as user_topics from "./user_topics.ts";
import type {UserTopic} from "./user_topics.ts";
import * as util from "./util.ts";

export let loaded = false;

Expand All @@ -31,6 +32,8 @@ export function populate_list(): void {
modifier_html(user_topic) {
const context = {
user_topic,
topic_display_name: util.get_final_topic_display_name(user_topic.topic),
is_empty_string_topic: user_topic.topic === "",
user_topic_visibility_policy_values:
settings_config.user_topic_visibility_policy_values,
};
Expand Down
2 changes: 1 addition & 1 deletion web/templates/user_topic_ui_row.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{#with user_topic}}
<tr data-stream-id="{{stream_id}}" data-stream="{{stream}}" data-topic="{{topic}}" data-date-updated="{{date_updated_str}}" data-visibility-policy="{{visibility_policy}}">
<td class="user-topic-stream">{{stream}}</td>
<td class="white-space-preserve-wrap user-topic">{{topic}}</td>
<td class="white-space-preserve-wrap user-topic {{#if ../is_empty_string_topic}}empty-topic-display{{/if}}">{{../topic_display_name}}</td>
<td>
<select class="settings_user_topic_visibility_policy list_select bootstrap-focus-style" data-setting-widget-type="number">
{{#each ../user_topic_visibility_policy_values}}
Expand Down

0 comments on commit 97e8ed5

Please sign in to comment.