[group_collection] Change to -my groups- timeline

This commit is contained in:
Fosco Marotto
2021-01-23 03:13:47 -05:00
parent 3719a6cfd7
commit 958e8aad3a
4 changed files with 61 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ class Api::V1::StatusesController < Api::BaseController
def comments
descendants_results = @status.descendants(CONTEXT_LIMIT, current_account, nil, nil)
loaded_descendants = cache_collection(descendants_results, Status)
@context = Context.new(descendants: loaded_descendants)
statuses = [@status] + @context.descendants
@@ -51,6 +51,7 @@ class Api::V1::StatusesController < Api::BaseController
def create
markdown = status_params[:markdown] unless status_params[:markdown] === status_params[:status]
@status = PostStatusService.new.call(current_user.account,
text: status_params[:status],
markdown: markdown,

View File

@@ -64,13 +64,13 @@ class Api::V1::Timelines::GroupCollectionController < Api::BaseController
if @collection_type == 'featured'
@groupIds = FetchGroupsService.new.call("featured")
elsif @collection_type == 'member' && !current_account.nil?
@groupIds = current_account.groups.pluck(:id)
# @groupIds = current_account.groups.pluck(:id)
return SortingQueryBuilder.new.call(@sort_type, @groupIds, params[:page], current_account.id, "group_collection")
end
if current_account
SortingQueryBuilder.new.call(@sort_type, @groupIds, params[:page]).reject {|status|
FeedManager.instance.filter?(:home, status, current_account.id)
}
SortingQueryBuilder.new.call(@sort_type, @groupIds, params[:page])
# .reject {|status| FeedManager.instance.filter?(:home, status, current_account.id)}
else
return []
# page = [params[:page].to_i.abs, MIN_UNAUTHENTICATED_PAGES].min