about summary refs log tree commit diff
path: root/app/helpers/stream_entries_helper.rb
diff options
context:
space:
mode:
authorJenkins <jenkins@jenkins.ninjawedding.org>2018-03-09 00:17:17 +0000
committerJenkins <jenkins@jenkins.ninjawedding.org>2018-03-09 00:17:17 +0000
commit447d7e612753d69f043e08ebb228b21e411c8b4a (patch)
tree80caebcff2b131898f620f89ad0858d44530d30f /app/helpers/stream_entries_helper.rb
parent43a9a781a443a6b9296431fbcc4285b3ca6a1a57 (diff)
parentff44b2e92d496c6027b20157fea6ebd885906bea (diff)
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'app/helpers/stream_entries_helper.rb')
-rw-r--r--app/helpers/stream_entries_helper.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb
index 445114985..54b92bdf4 100644
--- a/app/helpers/stream_entries_helper.rb
+++ b/app/helpers/stream_entries_helper.rb
@@ -8,6 +8,27 @@ module StreamEntriesHelper
     account.display_name.presence || account.username
   end
 
+  def account_description(account)
+    prepend_str = [
+      [
+        number_to_human(account.statuses_count, strip_insignificant_zeros: true),
+        t('accounts.posts'),
+      ].join(' '),
+
+      [
+        number_to_human(account.following_count, strip_insignificant_zeros: true),
+        t('accounts.following'),
+      ].join(' '),
+
+      [
+        number_to_human(account.followers_count, strip_insignificant_zeros: true),
+        t('accounts.followers'),
+      ].join(' '),
+    ].join(', ')
+
+    [prepend_str, account.note].join(' · ')
+  end
+
   def stream_link_target
     embedded_view? ? '_blank' : nil
   end