 
     return  unless (messages = @props.thread.get 'messages').size
 
-    if @props.showPopularMessages
-      from = messages.last().get 'createdAt'
-      ActivityFlux.actions.message.loadPopularMessages @channel('id'), { from }
-    else
-      from = messages.first().get 'createdAt'
-      ActivityFlux.actions.message.loadMessages @channel('id'), { from }
+    switch @props.thread.getIn ['flags', 'resultListState']
+      when ResultState.LIKED
+        from = messages.last().get 'createdAt'
+        ActivityFlux.actions.channel.loadPopularMessages @channel('id'), { from }
+      when ResultState.RECENT
+        from = messages.first().get 'createdAt'
+        ActivityFlux.actions.message.loadMessages @channel('id'), { from }
 
 
   onThresholdReached: (event) ->

      key={@props.thread.get 'channelId'}
      thread={@props.thread}
      onLoadMore={@bound 'onLoadMore'}
      showPopularMessages={@props.showPopularMessages}
    />


FeedPane       = require './feedpane'
ActivityFlux   = require 'activity/flux'
ScrollerMixin  = require 'app/components/scroller/scrollermixin'
ResultState    = require 'activity/util/resultStates'

module.exports = class PublicFeedPane extends React.Component

  @defaultProps =
    thread   : immutable.Map()
    messages : immutable.List()


  channel: (keyPath...) -> @props.thread?.getIn ['channel'].concat keyPath
