gearheads
/
mastodon
Archived
2
0
Fork 0

Fix admin statuses page order with media (#17538)

gh/stable
Jeong Arm 2022-02-15 00:07:04 +09:00 committed by GitHub
parent 9a015e43ef
commit d39df35441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class Admin::StatusFilter
def scope_for(key, value) def scope_for(key, value)
case key.to_s case key.to_s
when 'media' when 'media'
Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id) Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id).reorder('statuses.id desc')
when 'id' when 'id'
Status.where(id: value) Status.where(id: value)
else else