about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorTakeshi Umeda <noel.yoshiba@gmail.com>2020-11-13 01:43:12 +0900
committerGitHub <noreply@github.com>2020-11-12 17:43:12 +0100
commit148ce97e21092500a2abeb87f6dc3c0adf5f28e4 (patch)
treec9f457d49e7de6f90b3901f318b92609574a3560 /app/controllers
parent2b1a6e734ff42c17fb971cf909509b6b2ad84879 (diff)
Add interrelationship icon (#15149)
* Add interrelationship icon

* Fix arrow for rtl

* Fix to predefined color
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/relationships_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/relationships_controller.rb b/app/controllers/relationships_controller.rb
index 031e3241f..96cce55e9 100644
--- a/app/controllers/relationships_controller.rb
+++ b/app/controllers/relationships_controller.rb
@@ -5,6 +5,7 @@ class RelationshipsController < ApplicationController
 
   before_action :authenticate_user!
   before_action :set_accounts, only: :show
+  before_action :set_relationships, only: :show
   before_action :set_body_classes
 
   helper_method :following_relationship?, :followed_by_relationship?, :mutual_relationship?
@@ -28,6 +29,10 @@ class RelationshipsController < ApplicationController
     @accounts = RelationshipFilter.new(current_account, filter_params).results.page(params[:page]).per(40)
   end
 
+  def set_relationships
+    @relationships = AccountRelationshipsPresenter.new(@accounts.pluck(:id), current_user.account_id)
+  end
+
   def form_account_batch_params
     params.require(:form_account_batch).permit(:action, account_ids: [])
   end