]> cat aescling's git repositories - mastodon.git/commitdiff
Do not show follow button on moved or memorial accounts (#8546)
authorThibG <thib@sitedethib.com>
Fri, 31 Aug 2018 18:33:01 +0000 (20:33 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 31 Aug 2018 18:33:01 +0000 (20:33 +0200)
This restores the logic from before the public profile redesign. Fixes #8503

app/helpers/stream_entries_helper.rb

index 187bfe4a062aedbbb0fa8f5d48f07f9cc8185599..ac655f6227d7b4d800f7aebf602b1204035b9117 100644 (file)
@@ -22,12 +22,12 @@ module StreamEntriesHelper
         link_to account_unfollow_path(account), class: 'button logo-button button--destructive', data: { method: :post } do
           safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.unfollow')])
         end
-      else
+      elsif !(account.memorial? || account.moved?)
         link_to account_follow_path(account), class: 'button logo-button', data: { method: :post } do
           safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.follow')])
         end
       end
-    else
+    elsif !(account.memorial? || account.moved?)
       link_to account_remote_follow_path(account), class: 'button logo-button modal-button', target: '_new' do
         safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.follow')])
       end