recipient_row: Use _html naming convention for content rendered as HTML.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
This commit is contained in:
apoorvapendse
2025-07-19 14:44:20 +05:30
committed by Tim Abbott
parent 30d8ba591a
commit 208372d0d2
2 changed files with 11 additions and 11 deletions

View File

@@ -82,7 +82,7 @@ export type MessageContainer = {
export type MessageGroup = { export type MessageGroup = {
bookend_top?: boolean; bookend_top?: boolean;
date: string; date_html: string;
date_unchanged: boolean; date_unchanged: boolean;
message_containers: MessageContainer[]; message_containers: MessageContainer[];
message_group_id: string; message_group_id: string;
@@ -96,7 +96,7 @@ export type MessageGroup = {
is_topic_editable: boolean; is_topic_editable: boolean;
is_web_public: boolean; is_web_public: boolean;
just_unsubscribed?: boolean; just_unsubscribed?: boolean;
match_topic: string | undefined; match_topic_html: string | undefined;
recipient_bar_color: string; recipient_bar_color: string;
stream_id: number; stream_id: number;
stream_name?: string; stream_name?: string;
@@ -364,7 +364,7 @@ function populate_group_from_message(
const is_private = message.is_private; const is_private = message.is_private;
const display_recipient = message.display_recipient; const display_recipient = message.display_recipient;
const message_group_id = _.uniqueId("message_group_"); const message_group_id = _.uniqueId("message_group_");
const date = get_group_display_date(message, year_changed); const date_html = get_group_display_date(message, year_changed);
// Each searched message is a self-contained result, // Each searched message is a self-contained result,
// so we always display date in the recipient bar for those messages. // so we always display date in the recipient bar for those messages.
@@ -381,7 +381,7 @@ function populate_group_from_message(
const topic = message.topic; const topic = message.topic;
const topic_display_name = util.get_final_topic_display_name(topic); const topic_display_name = util.get_final_topic_display_name(topic);
const is_empty_string_topic = topic === ""; const is_empty_string_topic = topic === "";
const match_topic = util.get_match_topic(message); const match_topic_html = util.get_match_topic(message);
const stream_url = hash_util.channel_url_by_user_setting(message.stream_id); const stream_url = hash_util.channel_url_by_user_setting(message.stream_id);
const is_archived = stream_data.is_stream_archived(message.stream_id); const is_archived = stream_data.is_stream_archived(message.stream_id);
const topic_url = internal_url.by_stream_topic_url( const topic_url = internal_url.by_stream_topic_url(
@@ -420,7 +420,7 @@ function populate_group_from_message(
...get_topic_edit_properties(message), ...get_topic_edit_properties(message),
user_can_resolve_topic, user_can_resolve_topic,
...subscription_markers, ...subscription_markers,
date, date_html,
display_recipient, display_recipient,
date_unchanged, date_unchanged,
topic_links, topic_links,
@@ -431,7 +431,7 @@ function populate_group_from_message(
stream_privacy_icon_color, stream_privacy_icon_color,
invite_only, invite_only,
is_web_public, is_web_public,
match_topic, match_topic_html,
stream_url, stream_url,
is_archived, is_archived,
topic_url, topic_url,
@@ -454,7 +454,7 @@ function populate_group_from_message(
is_stream, is_stream,
is_private, is_private,
...get_topic_edit_properties(message), ...get_topic_edit_properties(message),
date, date_html,
date_unchanged, date_unchanged,
display_recipient, display_recipient,
pm_with_url: message.pm_with_url, pm_with_url: message.pm_with_url,
@@ -2000,7 +2000,7 @@ export class MessageListView {
.attr("id")!; .attr("id")!;
const group = this._find_message_group(message_group_id); const group = this._find_message_group(message_group_id);
if (group !== undefined) { if (group !== undefined) {
const rendered_date = group.date; const rendered_date = group.date_html;
dom_updates.html_updates.push({ dom_updates.html_updates.push({
$element: $current_sticky_header.find(".recipient_row_date"), $element: $current_sticky_header.find(".recipient_row_date"),
rendered_date, rendered_date,

View File

@@ -29,7 +29,7 @@
href="{{topic_url}}" href="{{topic_url}}"
data-tippy-content="{{t 'Go to #{display_recipient} > {topic_display_name}' }}"> data-tippy-content="{{t 'Go to #{display_recipient} > {topic_display_name}' }}">
{{#if (and use_match_properties (not is_empty_string_topic))}} {{#if (and use_match_properties (not is_empty_string_topic))}}
<span class="stream-topic-inner">{{{match_topic}}}</span> <span class="stream-topic-inner">{{{match_topic_html}}}</span>
{{else}} {{else}}
<span class="stream-topic-inner {{#if is_empty_string_topic}}empty-topic-display{{/if}}">{{topic_display_name}}</span> <span class="stream-topic-inner {{#if is_empty_string_topic}}empty-topic-display{{/if}}">{{topic_display_name}}</span>
{{/if}} {{/if}}
@@ -88,7 +88,7 @@
{{> components/icon_button icon="more-vertical" intent="neutral" custom_classes="recipient-bar-control-icon" data-tippy-content=(t "Topic actions") aria-label=(t "Topic actions") }} {{> components/icon_button icon="more-vertical" intent="neutral" custom_classes="recipient-bar-control-icon" data-tippy-content=(t "Topic actions") aria-label=(t "Topic actions") }}
</span> </span>
</span> </span>
<span class="recipient_row_date {{#if (and (not always_display_date) date_unchanged )}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span> <span class="recipient_row_date {{#if (and (not always_display_date) date_unchanged )}}recipient_row_date_unchanged{{/if}}">{{{date_html}}}</span>
</div> </div>
</div> </div>
{{else}} {{else}}
@@ -113,7 +113,7 @@
{{/if}} {{/if}}
</span> </span>
</a> </a>
<span class="recipient_row_date {{#if (and (not always_display_date) date_unchanged )}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span> <span class="recipient_row_date {{#if (and (not always_display_date) date_unchanged )}}recipient_row_date_unchanged{{/if}}">{{{date_html}}}</span>
</div> </div>
</div> </div>
{{/if}} {{/if}}