Merge pull request #824 from mouse-reeve/dm-pagination

Fixes display of dms pagination
This commit is contained in:
Mouse Reeve 2021-03-29 14:37:05 -07:00 committed by GitHub
commit cefb93f2a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -27,7 +27,6 @@
</div>
{% endfor %}
{% include 'snippets/pagination.html' with page=activities path="direct-messages" %}
</section>
{% endblock %}

View file

@ -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)