         visible: visible
 
 
+  changeSort: (e) =>
+    e.preventDefault()
+    if @state.sortField == 'created_at'
+      @setState sortField: 'updated_at'
+    else
+      @setState sortField: 'created_at'
+
+
   expand: (e) =>
     e.preventDefault()
     $.publish 'beatmapDiscussionEntry:collapse', collapse: e.currentTarget.dataset.type


        div className: "#{bn}__toolbar",
          div className: "#{bn}__toolbar-content #{bn}__toolbar-content--right",
            a
              href: '#'
              className: "#{bn}__toolbar-link"

      else false


  sortedDisussions: ->
    discussions = @props.currentDiscussions[@props.mode]
    if @state.sortField == 'updated_at'
      discussions.sort (a, b) ->
        if Date.parse(a.updated_at) < Date.parse(b.updated_at) then 1 else -1
    else
      discussions.sort (a, b) ->
        if Date.parse(a.created_at) > Date.parse(b.created_at) then 1 else -1



  timelineCircle: =>
    div
      'data-visibility': if @props.mode != 'timeline' then 'hidden'
