Fix output 0 as count when user set hide counts
This commit is contained in:
parent
a5fcacaded
commit
b50d851385
3 changed files with 5 additions and 5 deletions
|
@ -63,7 +63,7 @@ class FollowerAccountsController < ApplicationController
|
|||
ActivityPub::CollectionPresenter.new(
|
||||
id: account_followers_url(@account, page: params.fetch(:page, 1)),
|
||||
type: :ordered,
|
||||
size: @account.followers_count,
|
||||
size: @account.user&.setting_hide_followers_count ? 0 : @account.followers_count,
|
||||
items: follows.map { |follow| ActivityPub::TagManager.instance.uri_for(follow.account) },
|
||||
part_of: account_followers_url(@account),
|
||||
next: next_page_url,
|
||||
|
@ -73,7 +73,7 @@ class FollowerAccountsController < ApplicationController
|
|||
ActivityPub::CollectionPresenter.new(
|
||||
id: account_followers_url(@account),
|
||||
type: :ordered,
|
||||
size: @account.followers_count,
|
||||
size: @account.user&.setting_hide_followers_count ? 0 : @account.followers_count,
|
||||
first: page_url(1)
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue