summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-08-04 11:30:24 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-08-04 11:30:24 -0400
commit1361540de43f582ff2cebe9a5c6031aac0b1ded5 (patch)
treed5a96833ecaacbee8256383cccb5aed248114ae1
parent2c46ee8420eb19d827d3f2072bd536aae2038f84 (diff)
downloadchat-1361540de43f582ff2cebe9a5c6031aac0b1ded5.tar.gz
chat-1361540de43f582ff2cebe9a5c6031aac0b1ded5.tar.bz2
chat-1361540de43f582ff2cebe9a5c6031aac0b1ded5.zip
Added a date separator before the first post displayed in a channel
-rw-r--r--web/react/components/post_list.jsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index 3f59d5843..771531b57 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -311,7 +311,6 @@ module.exports = React.createClass({
} else if (channel.type === 'D') {
var teammate = utils.getDirectTeammate(channel.id)
-
if (teammate) {
var teammate_name = teammate.nickname.length > 0 ? teammate.nickname : teammate.username;
more_messages = (
@@ -399,7 +398,7 @@ module.exports = React.createClass({
var postCtls = [];
if (posts) {
- var previousPostDay = posts[order[order.length-1]] ? utils.getDateForUnixTicks(posts[order[order.length-1]].create_at): new Date();
+ var previousPostDay = new Date(0);
var currentPostDay;
for (var i = order.length-1; i >= 0; i--) {