Commit 62e8f846 authored by Fosco Marotto's avatar Fosco Marotto

[Lists] Change data source and query method

parent 180be82c
......@@ -18,6 +18,7 @@ class Api::V1::Timelines::ListController < Api::BaseController
def set_list
@list = List.where(account: current_account).find(params[:id])
@accounts = ListAccount.select('follow_id').where(list_id: @list)
end
def set_statuses
......@@ -29,16 +30,12 @@ class Api::V1::Timelines::ListController < Api::BaseController
end
def list_statuses
list_feed.get(
statuses = Status.where(
account: @accounts, reply: false
).paginate_by_id(
limit_param(DEFAULT_STATUSES_LIMIT),
params[:max_id],
params[:since_id],
params[:min_id]
)
end
def list_feed
ListFeed.new(@list)
params_slice(:max_id, :since_id, :min_id)
).reject { |status| FeedManager.instance.filter?(:home, status, current_account.id) }
end
def insert_pagination_headers
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment