Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix statuses order in account's statuses admin page (mastodon#16937)
Browse files Browse the repository at this point in the history
  • Loading branch information
tribela authored Nov 4, 2021
1 parent afb2b19 commit 458830e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/admin/statuses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def index
@statuses = @account.statuses.where(visibility: [:public, :unlisted])

if params[:media]
@statuses.merge!(Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id))
@statuses.merge!(Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id)).reorder('statuses.id desc')
end

@statuses = @statuses.preload(:media_attachments, :mentions).page(params[:page]).per(PER_PAGE)
Expand Down

0 comments on commit 458830e

Please sign in to comment.