From 3be420944eee1bcacc80c89c22a2c7cf51c5dc7c Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 29 Mar 2021 13:51:06 -0700 Subject: [PATCH 1/2] Fixes display of dms pagination --- bookwyrm/templates/feed/direct_messages.html | 1 - bookwyrm/views/feed.py | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/feed/direct_messages.html b/bookwyrm/templates/feed/direct_messages.html index 2c28a79b7..f097fd9f4 100644 --- a/bookwyrm/templates/feed/direct_messages.html +++ b/bookwyrm/templates/feed/direct_messages.html @@ -27,7 +27,6 @@ {% endfor %} - {% include 'snippets/pagination.html' with page=activities path="direct-messages" %} {% endblock %} diff --git a/bookwyrm/views/feed.py b/bookwyrm/views/feed.py index d068834ac..f96072d6c 100644 --- a/bookwyrm/views/feed.py +++ b/bookwyrm/views/feed.py @@ -87,7 +87,9 @@ class DirectMessage(View): if user: queryset = queryset.filter(Q(user=user) | Q(mention_users=user)) - activities = privacy_filter(request.user, queryset, privacy_levels=["direct"]) + activities = privacy_filter( + request.user, queryset, privacy_levels=["direct"] + ).order_by('-published_date') paginated = Paginator(activities, PAGE_LENGTH) activity_page = paginated.page(page) From 2722050ee2933f40b1113b65928d57458bbc6839 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 29 Mar 2021 14:20:51 -0700 Subject: [PATCH 2/2] Python formatting --- bookwyrm/views/feed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/views/feed.py b/bookwyrm/views/feed.py index f96072d6c..eb4e370e9 100644 --- a/bookwyrm/views/feed.py +++ b/bookwyrm/views/feed.py @@ -89,7 +89,7 @@ class DirectMessage(View): activities = privacy_filter( request.user, queryset, privacy_levels=["direct"] - ).order_by('-published_date') + ).order_by("-published_date") paginated = Paginator(activities, PAGE_LENGTH) activity_page = paginated.page(page)