message_list: Rename show_date_separator to show_group_date_divider.

This commit is contained in:
Tim Abbott 2019-02-08 11:24:01 -08:00
parent 0d66d3fafd
commit 21a86f3ef7
5 changed files with 9 additions and 9 deletions

View File

@ -900,7 +900,7 @@ run_test('message_group', () => {
message_ids: [1, 2],
message_containers: messages,
group_date_divider_html: '"<span class="timerender82">Jan&nbsp;07</span>"',
show_date_separator: true,
show_group_date_divider: true,
match_topic: '<span class="highlight">two</span> messages',
},
];
@ -1619,7 +1619,7 @@ run_test('archive_message_group', () => {
display_recipient: "support",
message_containers: messages,
group_date_divider_html: '"<span class="timerender82">Jan&nbsp;07</span>"',
show_date_separator: true,
show_group_date_divider: true,
},
];

View File

@ -25,7 +25,7 @@ exports.initialize = function () {
var topic = recipient_and_topic.split('-')[1];
var recipient_color = color_data.pick_color();
current_message_group.message_containers = [];
current_message_group.show_date_separator = false;
current_message_group.show_group_date_divider = false;
current_message_group.display_recipient = stream_name;
current_message_group.topic = topic;
current_message_group.background_color = recipient_color;
@ -41,7 +41,7 @@ exports.initialize = function () {
current_message_group.message_containers = [];
current_message_group.group_date_divider_html =
timerender.render_date(time, prev_time, today)[0].outerHTML;
current_message_group.show_date_separator = true;
current_message_group.show_group_date_divider = true;
current_message_group.display_recipient = stream_name;
current_message_group.topic = topic;
current_message_group.background_color = recipient_color;

View File

@ -85,17 +85,17 @@ function update_group_time_display(group, message_container, prev) {
// NB: group_date_divider_html is HTML, inserted into the document without escaping.
group.group_date_divider_html = timerender.render_date(time, prev_time,
today)[0].outerHTML;
group.show_date_separator = true;
group.show_group_date_divider = true;
}
} else {
// Show the date in the recipient bar, but not a date separator bar.
group.show_date_separator = false;
group.show_group_date_divider = false;
group.group_date_divider_html = timerender.render_date(time, undefined, today)[0].outerHTML;
}
}
function clear_group_date_divider(group) {
group.show_date_separator = false;
group.show_group_date_divider = false;
group.group_date_divider_html = undefined;
}

View File

@ -1,7 +1,7 @@
{{#each message_groups}}
{{#with this}}
{{#if show_date_separator}}
{{#if show_group_date_divider}}
<div class="date_row no-select">{{{group_date_divider_html}}}</div>
{{/if}}

View File

@ -3,7 +3,7 @@
{{#each message_groups}}
{{#with this}}
{{#if show_date_separator}}
{{#if show_group_date_divider}}
<div class="date_row no-select">{{{group_date_divider_html}}}</div>
{{/if}}