   @defaultProps =
     messages     : immutable.List()
     showItemMenu : yes
-    thread       : {}
+    firstPost    : null
+    isMessagesLoading: no
 
 
   calculateRemainingMessageCount: ->
 
-    return no  unless @props.thread.message
+    { firstPost } = @props
+    return no  unless firstPost
 
-    repliesCount = @props.thread.getIn ['message', 'repliesCount']
+    repliesCount = firstPost.get 'repliesCount'
     messageCount = @props.messages.size - 1
     count = repliesCount - messageCount
     count =  if count > 0 then count else 0

    lastMessageId = null
    { messages, showItemMenu } = @props

    messages.map (message, i) =>
      itemProps =
        key          : message.get 'id'
        message      : message


  getFirstMessageId: ->

    { firstPost } = @props

    if firstPost then firstPost.get '_id' else no


  renderFirstMessageDate: (count) ->

    if @props.isMessagesLoading
      <div className='ChatItem-moreCount'>loading...</div>
    else if count
      <div className='ChatItem-moreCount'>{count} more</div>
