Fix admin statuses page order with media (#17538)

This commit is contained in:
Jeong Arm 2022-02-15 00:07:04 +09:00 committed by GitHub
parent cf8fee1379
commit 0ad6f982af

View file

@ -31,7 +31,7 @@ class Admin::StatusFilter
def scope_for(key, value)
case key.to_s
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'
Status.where(id: value)
else