From 21fee19b428d7883042d0802996848cc77370081 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 28 Sep 2021 15:51:49 -0700 Subject: [PATCH] Use recently active as the default sort order --- bookwyrm/templates/directory/community_filter.html | 2 +- bookwyrm/templates/directory/sort_filter.html | 4 ++-- bookwyrm/views/directory.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bookwyrm/templates/directory/community_filter.html b/bookwyrm/templates/directory/community_filter.html index bd0ba7785..91783fd36 100644 --- a/bookwyrm/templates/directory/community_filter.html +++ b/bookwyrm/templates/directory/community_filter.html @@ -8,7 +8,7 @@ {% trans "Local users" %} {% endblock %} diff --git a/bookwyrm/templates/directory/sort_filter.html b/bookwyrm/templates/directory/sort_filter.html index 82b561fb7..c7c19f6fe 100644 --- a/bookwyrm/templates/directory/sort_filter.html +++ b/bookwyrm/templates/directory/sort_filter.html @@ -5,8 +5,8 @@
{% endblock %} diff --git a/bookwyrm/views/directory.py b/bookwyrm/views/directory.py index 8d893047a..81898af26 100644 --- a/bookwyrm/views/directory.py +++ b/bookwyrm/views/directory.py @@ -25,10 +25,10 @@ class Directory(View): users = suggested_users.get_annotated_users(request.user, **filters) sort = request.GET.get("sort") - if sort == "recent": - users = users.order_by("-last_active_date") - else: + if sort == "suggested": users = users.order_by("-mutuals", "-last_active_date") + else: + users = users.order_by("-last_active_date") paginated = Paginator(users, 12)