Skip to content

Commit

Permalink
Fix pinned statuses being shown in a featured hashtag (mastodon#9971)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and hiyuki2578 committed Oct 2, 2019
1 parent 10d3a40 commit 3eb723c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def show
private

def show_pinned_statuses?
[replies_requested?, media_requested?, params[:max_id].present?, params[:min_id].present?].none?
[replies_requested?, media_requested?, tag_requested?, params[:max_id].present?, params[:min_id].present?].none?
end

def filtered_statuses
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/settings/featured_tags_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def set_featured_tag
end

def set_featured_tags
@featured_tags = current_account.featured_tags.reject(&:new_record?)
@featured_tags = current_account.featured_tags.order(statuses_count: :desc).reject(&:new_record?)
end

def set_most_used_tags
Expand Down
2 changes: 1 addition & 1 deletion app/views/accounts/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
- @endorsed_accounts.each do |account|
= account_link_to account

- @account.featured_tags.each do |featured_tag|
- @account.featured_tags.order(statuses_count: :desc).each do |featured_tag|
.directory__tag{ class: params[:tag] == featured_tag.name ? 'active' : nil }
= link_to short_account_tag_path(@account, featured_tag.tag) do
%h4
Expand Down

0 comments on commit 3eb723c

Please sign in to comment.