Fixes display of dms pagination

This commit is contained in:
Mouse Reeve 2021-03-29 13:51:06 -07:00
parent 18c552d215
commit 3be420944e
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)