mirror of https://github.com/zulip/zulip.git
message_list: Rename show_date_separator to show_group_date_divider.
This commit is contained in:
parent
0d66d3fafd
commit
21a86f3ef7
|
@ -900,7 +900,7 @@ run_test('message_group', () => {
|
|||
message_ids: [1, 2],
|
||||
message_containers: messages,
|
||||
group_date_divider_html: '"<span class="timerender82">Jan 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 07</span>"',
|
||||
show_date_separator: true,
|
||||
show_group_date_divider: true,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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}}
|
||||
|
||||
|
|
|
@ -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}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue