Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/relationships_controller.rb`: Upstream changed a line too close to a glitch-soc only line related to glitch-soc's theming system. Applied upstream changes accordingly.
This commit is contained in:
commit
c077cdaba7
54 changed files with 1213 additions and 829 deletions
|
@ -6,6 +6,7 @@ class RelationshipsController < ApplicationController
|
|||
before_action :authenticate_user!
|
||||
before_action :set_accounts, only: :show
|
||||
before_action :set_pack
|
||||
before_action :set_relationships, only: :show
|
||||
before_action :set_body_classes
|
||||
|
||||
helper_method :following_relationship?, :followed_by_relationship?, :mutual_relationship?
|
||||
|
@ -29,6 +30,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
|
||||
|
@ -50,7 +55,9 @@ class RelationshipsController < ApplicationController
|
|||
end
|
||||
|
||||
def action_from_button
|
||||
if params[:unfollow]
|
||||
if params[:follow]
|
||||
'follow'
|
||||
elsif params[:unfollow]
|
||||
'unfollow'
|
||||
elsif params[:remove_from_followers]
|
||||
'remove_from_followers'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue