       title        : "Live Updates: "
       size         : "tiny"
       callback     : (state) =>
-        @appStorage.setValue 'liveUpdates', state, =>
+        @_togglePollForUpdates state
+        @appStorage.setValue 'liveUpdates', state, ->
         @updateShowNewItemsLink()
         KD.getSingleton('activityController').flags = liveUpdates : state
         KD.getSingleton('activityController').emit "LiveStatusUpdateStateChanged", state

      KD.getSingleton('activityController').flags = liveUpdates : state
      @lowQualitySwitch.setValue? @appStorage.getValue('showLowQualityContent') or off

  pistachio:(newCount)->
    "<div class='header-wrapper'><span>Latest Activity</span>{{> @lowQualitySwitch}}{{> @liveUpdateButton}} {{> @showNewItemsLink}}{{> @refreshLink}}</div>"

  newActivityArrived:->
    @_newItemsCount++
    @updateShowNewItemsLink()


class ActivityListHeader extends JView

  __count = 0


  constructor:->

