       cssClass         : 'edit-widget-wrapper'
 
 
+  initViewEvents: ->
+
+    @settingsButton.on 'ActivityIsDeleted',     @bound 'delete'
+    @settingsButton.on 'ActivityEditIsClicked', @bound 'showEditWidget'
+
+
+  initDataEvents: ->
+
+    data = @getData()
+
+    data.on 'PostIsDeleted', @bound 'delete'
+    data.on 'update',        @bound 'handleUpdate'
+
+    data.watch 'repliesCount', (count) =>
+      @commentBox.decorateCommentedState() if count >= 0
+
+
+  handleUpdate: (fields) ->
+
+    { createdAt, updatedAt } = @getData()
+
+    if updatedAt > createdAt
+    then @setClass 'edited'
+    else @unsetClass 'edited'
+
+
   showEditWidget : ->
 
     @editWidget?.destroy()


    super options, data

    data   = @getData()
    list   = @getDelegate()

    origin =
      constructorName : data.account.constructorName
      id              : data.account._id

    @avatar = new AvatarView
      size       :
        width    : 37
        height   : 37
      cssClass   : 'author-avatar'
      origin     : origin

    @author      = new ProfileLinkView { origin }

    {commentViewClass, activitySettings: {disableFollow}} = @getOptions()

    @commentBox = new commentViewClass options.commentSettings, data
    @actionLinks = new ActivityActionsView delegate: @commentBox, data

    @commentBox.forwardEvent @actionLinks, "Reply"

    @editWidget.destroy()
    @editWidgetWrapper.hide()
    @unsetClass 'editing'


  delete: ->
