mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 17:41:08 +00:00
Merge pull request #824 from mouse-reeve/dm-pagination
Fixes display of dms pagination
This commit is contained in:
commit
cefb93f2a3
2 changed files with 3 additions and 2 deletions
|
@ -27,7 +27,6 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% include 'snippets/pagination.html' with page=activities path="direct-messages" %}
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -87,7 +87,9 @@ class DirectMessage(View):
|
||||||
if user:
|
if user:
|
||||||
queryset = queryset.filter(Q(user=user) | Q(mention_users=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)
|
paginated = Paginator(activities, PAGE_LENGTH)
|
||||||
activity_page = paginated.page(page)
|
activity_page = paginated.page(page)
|
||||||
|
|
Loading…
Reference in a new issue