about summary refs log tree commit diff
path: root/app/models/account_filter.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-10-05 15:23:57 +0200
committerThibaut Girka <thib@sitedethib.com>2018-10-05 15:23:57 +0200
commit00fcdebed758f031b486ec239fd425fc54a180b3 (patch)
tree1211e136ba3e886ee8daaa5200babffc42375dd1 /app/models/account_filter.rb
parenta9e8f98a9d32c57956d41009bd09a1f33310676e (diff)
parent028ad4124cf1fdb28f5cf11bd7080e7a63f2f99e (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
	db/migrate/20170716191202_add_hide_notifications_to_mute.rb
	spec/controllers/application_controller_spec.rb

Took our version, upstream changes were only minor style linting.
Diffstat (limited to 'app/models/account_filter.rb')
-rw-r--r--app/models/account_filter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/account_filter.rb b/app/models/account_filter.rb
index dc7a03039..84364bf1b 100644
--- a/app/models/account_filter.rb
+++ b/app/models/account_filter.rb
@@ -8,7 +8,7 @@ class AccountFilter
   end
 
   def results
-    scope = Account.alphabetic
+    scope = Account.recent
 
     params.each do |key, value|
       scope.merge!(scope_for(key, value)) if value.present?
@@ -29,8 +29,8 @@ class AccountFilter
       Account.where(domain: value)
     when 'silenced'
       Account.silenced
-    when 'recent'
-      Account.recent
+    when 'alphabetic'
+      Account.reorder(nil).alphabetic
     when 'suspended'
       Account.suspended
     when 'username'