From 47465ea51a2594e0cdb8dde583d36b1cf72f4717 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 5 Jun 2017 09:13:02 -0700 Subject: [PATCH] message_list: Fix missing date boundaries for newly sent messages. When receiving the first new message of a new day, we were previously not showing a date separator line before the message. Fixes a regression introduced in 00c7f7d42f5384ac0315429f673ba8c3b4e9deef. --- static/js/message_list_view.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/message_list_view.js b/static/js/message_list_view.js index f23bd7facb..7c65613c1c 100644 --- a/static/js/message_list_view.js +++ b/static/js/message_list_view.js @@ -368,6 +368,11 @@ MessageListView.prototype = { // Clear the date if it is the same as the last group delete second_group.show_date; delete second_group.show_date_separator; + } else { + // If we just sent the first message on a new day + // in a narrow, make sure we render a date separator. + add_display_time(second_group, first_msg_container, + last_msg_container); } } message_actions.append_groups = new_message_groups;