diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/accounts_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/api/statuses_controller.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/api/accounts_controller.rb b/app/controllers/api/accounts_controller.rb index f543ea98d..5bac98f81 100644 --- a/app/controllers/api/accounts_controller.rb +++ b/app/controllers/api/accounts_controller.rb @@ -15,7 +15,7 @@ class Api::AccountsController < ApiController end def statuses - @statuses = @account.statuses.with_includes.with_counters.order('created_at desc') + @statuses = @account.statuses.with_includes.with_counters.paginate_by_max_id(20, params[:max_id]) end def follow diff --git a/app/controllers/api/statuses_controller.rb b/app/controllers/api/statuses_controller.rb index 951f7113a..ba216a7b3 100644 --- a/app/controllers/api/statuses_controller.rb +++ b/app/controllers/api/statuses_controller.rb @@ -23,11 +23,11 @@ class Api::StatusesController < ApiController def home feed = Feed.new(:home, current_user.account) - @statuses = feed.get(20, (params[:offset] || 0).to_i) + @statuses = feed.get(20, params[:max_id] || '+inf') end def mentions feed = Feed.new(:mentions, current_user.account) - @statuses = feed.get(20, (params[:offset] || 0).to_i) + @statuses = feed.get(20, params[:max_id] || '+inf') end end |