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:
Tim Abbott
2019-02-08 14:54:40 -08:00
parent 31e98b8b65
commit 925bf7b907

View File

@@ -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;