     isMessagesLoading: no
 
 
+  getMarkers: (currentMessage, prevMessage, index) ->
+
+    currentMessageMoment = moment currentMessage.get 'createdAt'
+
+    if prevMessage
+      prevMessageMoment = moment prevMessage.get 'createdAt'
+
+    markers = []
+
+    switch
+      when not prevMessage
+        markers.push <DateMarker date={currentMessage.get 'createdAt'} />
+
+      when not currentMessageMoment.isSame prevMessageMoment, 'day'
+        markers.push <DateMarker date={currentMessage.get 'createdAt'} />
+
+    return markers
+
+
   renderChildren: ->
 
-    lastMessageId = null
     { messages, showItemMenu, channelName } = @props
 
-    messages.toList().map (message, i) ->
+    lastDifferentOwnerId = null
+    prevMessage = null
+
+    children = messages.toList().reduce (children, message, i) =>
 
       itemProps =
         key          : message.get 'id'

kd                    = require 'kd'
React                 = require 'kd-react'
immutable             = require 'immutable'
ChatListItem          = require 'activity/components/chatlistitem'
SimpleChatListItem    = require 'activity/components/chatlistitem/simplechatlistitem'

module.exports = class ChatList extends React.Component


        showItemMenu : showItemMenu
        channelName  : channelName

      children = children.concat @getMarkers message, prevMessage, i

      if lastDifferentOwnerId and lastDifferentOwnerId is message.get 'accountId'
        children.push \
          <SimpleChatListItem {...itemProps } />
      else
        lastDifferentOwnerId = message.get 'accountId'
        children.push \
          <ChatListItem {...itemProps} />

      prevMessage = message
      return children
    , []

    return children


  render: ->
