         list.emit "AllCommentsLinkWasClicked", this
 
     @liveUpdate = KD.getSingleton('activityController').flags?.liveUpdates or off
+
     KD.getSingleton('activityController').on "LiveStatusUpdateStateChanged", (newstate)=>
+
       # log "Live update state changed to", newstate
       @liveUpdate = newstate
 
-  ownCommentArrived:->
+
+  ownCommentArrived: ->
 
     # Get correct number of items in list from controller
     # I'm not sure maybe its not a good idea


    @updateNewCount()

  ownCommentDeleted:->
    if @newCount > 0
      @newCount++

  render:->

    # Get correct number of items in list from controller
    # I'm not sure maybe its not a good idea
    if @parent?.commentController?.getItemCount?()
      @onListCount = @parent.commentController.getItemCount()
    _newCount = @getData().repliesCount

    # Show View all bla bla link if there are more comments
    # than maxCommentToShow
    @show() if _newCount > @maxCommentToShow and @onListCount < _newCount

    # Check the oldCount before update anything
    # if its less means someone deleted a comment
    # otherwise it meanse we have a new comment
    # if nothing changed it means user clicked like button
    # so we don't need to touch anything
    if _newCount > @oldCount
      @newCount++
    else if _newCount < @oldCount
      if @newCount > 0 then @newCount--

    # If the count is changed then we need to update UI
    if _newCount isnt @oldCount
      @oldCount = _newCount
      @utils.defer => @updateNewCount()

    super

  updateNewCount:->

    # If there is no comments so we can not have new comments
    if @oldCount is 0 then @newCount = 0

class CommentViewHeader extends JView

  constructor: (options = {}, data) ->

    options.cssClass       = "show-more-comments in"
    options.itemTypeString = options.itemTypeString or "comments"

    super options, data

    @maxCommentToShow = options.maxCommentToShow or 3
    @oldCount         = data.repliesCount
