mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
message_list: Move update_group_date_divider earlier.
We need to move the update_group_date_divider call to run when a message group is created. This achieves a few things: * Fixes calling this multiple times useless for long message groups. * It will soon no longer be correct to assume that every message within a group has the same date, and in that case, we want to process the date of the first message in the group, not of the last.
This commit is contained in:
@@ -247,6 +247,8 @@ MessageListView.prototype = {
|
||||
current_group = start_group();
|
||||
add_message_container_to_group(message_container);
|
||||
|
||||
update_group_date_divider(current_group, message_container, prev);
|
||||
|
||||
message_container.include_recipient = true;
|
||||
message_container.subscribed = false;
|
||||
message_container.unsubscribed = false;
|
||||
@@ -272,7 +274,6 @@ MessageListView.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
update_group_date_divider(current_group, message_container, prev);
|
||||
set_timestr(message_container);
|
||||
|
||||
message_container.include_sender = true;
|
||||
|
||||
Reference in New Issue
Block a user