mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 00:38:27 +00:00
Merge commit '127503eb2cdd67126974bee304dde0f183300b84' into glitch-soc/merge-upstream
Conflicts: - `app/helpers/accounts_helper.rb`: Conflict due to glitch-soc's option to hide followers count. Ported upstream changes. Additional changes: - `app/views/application/mailer/_account.html.haml`: Ported glitch-soc's option to hide followers count. - `app/views/settings/flavours/show.html.haml`: Ported the `frontend_asset_url` helper change to glitch-soc.
This commit is contained in:
@@ -31,22 +31,26 @@ module AccountsHelper
|
||||
Setting.hide_followers_count || account.user&.settings&.[]('hide_followers_count')
|
||||
end
|
||||
|
||||
def account_formatted_stat(value)
|
||||
number_to_human(value, precision: 3, strip_insignificant_zeros: true)
|
||||
end
|
||||
|
||||
def account_description(account)
|
||||
prepend_stats = [
|
||||
[
|
||||
number_to_human(account.statuses_count, precision: 3, strip_insignificant_zeros: true),
|
||||
account_formatted_stat(account.statuses_count),
|
||||
I18n.t('accounts.posts', count: account.statuses_count),
|
||||
].join(' '),
|
||||
|
||||
[
|
||||
number_to_human(account.following_count, precision: 3, strip_insignificant_zeros: true),
|
||||
account_formatted_stat(account.following_count),
|
||||
I18n.t('accounts.following', count: account.following_count),
|
||||
].join(' '),
|
||||
]
|
||||
|
||||
unless hide_followers_count?(account)
|
||||
prepend_stats << [
|
||||
number_to_human(account.followers_count, precision: 3, strip_insignificant_zeros: true),
|
||||
account_formatted_stat(account.followers_count),
|
||||
I18n.t('accounts.followers', count: account.followers_count),
|
||||
].join(' ')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user