about summary refs log tree commit diff
path: root/app/helpers/stream_entries_helper.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-12-17 20:36:30 +0100
committerThibG <thib@sitedethib.com>2018-12-20 14:51:12 +0100
commita1c56fcef124b08fc2676d38fd79ed72d660d865 (patch)
tree4f409ee76e3a68ad7ff028974389523f8d8ce952 /app/helpers/stream_entries_helper.rb
parent0cd367e2954fd5407461a3c01e9fbfb297575145 (diff)
Add admin setting to disable followers count
Diffstat (limited to 'app/helpers/stream_entries_helper.rb')
-rw-r--r--app/helpers/stream_entries_helper.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb
index 033d435c4..e37cfbda4 100644
--- a/app/helpers/stream_entries_helper.rb
+++ b/app/helpers/stream_entries_helper.rb
@@ -61,7 +61,7 @@ module StreamEntriesHelper
   end
 
   def account_description(account)
-    prepend_str = [
+    prepend_stats = [
       [
         number_to_human(account.statuses_count, strip_insignificant_zeros: true),
         I18n.t('accounts.posts', count: account.statuses_count),
@@ -71,14 +71,16 @@ module StreamEntriesHelper
         number_to_human(account.following_count, strip_insignificant_zeros: true),
         I18n.t('accounts.following', count: account.following_count),
       ].join(' '),
+    ]
 
-      [
+    unless Setting.hide_followers_count
+      prepend_stats << [
         number_to_human(account.followers_count, strip_insignificant_zeros: true),
         I18n.t('accounts.followers', count: account.followers_count),
-      ].join(' '),
-    ].join(', ')
+      ].join(' ')
+    end
 
-    [prepend_str, account.note].join(' · ')
+    [prepend_stats.join(', '), account.note].join(' · ')
   end
 
   def media_summary(status)