]> cat aescling's git repositories - mastodon.git/commitdiff
Fix admin statuses page order with media (#17538)
authorJeong Arm <kjwonmail@gmail.com>
Mon, 14 Feb 2022 15:07:04 +0000 (00:07 +0900)
committerGitHub <noreply@github.com>
Mon, 14 Feb 2022 15:07:04 +0000 (16:07 +0100)
app/models/admin/status_filter.rb

index ce5bb5f4610bd19eeebf75c31a8d2231c181cef0..4fba612a65fb33d0817f64b6e8369ab380d4273c 100644 (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