Fix count to zero as hiding account's counts

This commit is contained in:
KMY 2023-05-20 21:29:44 +09:00
parent 8c863323c1
commit 2a9fcced3b
6 changed files with 27 additions and 15 deletions

View file

@ -30,18 +30,18 @@ module AccountsHelper
def account_description(account)
prepend_str = [
[
number_to_human(account.statuses_count, precision: 3, strip_insignificant_zeros: true),
I18n.t('accounts.posts', count: account.statuses_count),
number_to_human(account.public_statuses_count, precision: 3, strip_insignificant_zeros: true),
I18n.t('accounts.posts', count: account.public_statuses_count),
].join(' '),
[
number_to_human(account.following_count, precision: 3, strip_insignificant_zeros: true),
I18n.t('accounts.following', count: account.following_count),
number_to_human(account.public_following_count, precision: 3, strip_insignificant_zeros: true),
I18n.t('accounts.following', count: account.public_following_count),
].join(' '),
[
number_to_human(account.followers_count, precision: 3, strip_insignificant_zeros: true),
I18n.t('accounts.followers', count: account.followers_count),
number_to_human(account.public_followers_count, precision: 3, strip_insignificant_zeros: true),
I18n.t('accounts.followers', count: account.public_followers_count),
].join(' '),
].join(', ')