Fix pagination on home
This commit is contained in:
parent
fb881dd5de
commit
97d40912ed
|
@ -175,16 +175,16 @@ class MastodonPaginator:
|
||||||
|
|
||||||
if since_id:
|
if since_id:
|
||||||
queryset = queryset.filter(
|
queryset = queryset.filter(
|
||||||
models.Q(subject_post_id__gt=max_id)
|
models.Q(subject_post_id__gt=since_id)
|
||||||
| models.Q(subject_post_interaction_id__gt=max_id)
|
| models.Q(subject_post_interaction_id__gt=since_id)
|
||||||
)
|
)
|
||||||
|
|
||||||
if min_id:
|
if min_id:
|
||||||
# Min ID requires items _immediately_ newer than specified, so we
|
# Min ID requires items _immediately_ newer than specified, so we
|
||||||
# invert the ordering to accommodate
|
# invert the ordering to accommodate
|
||||||
queryset = queryset.filter(
|
queryset = queryset.filter(
|
||||||
models.Q(subject_post_id__gt=max_id)
|
models.Q(subject_post_id__gt=min_id)
|
||||||
| models.Q(subject_post_interaction_id__gt=max_id)
|
| models.Q(subject_post_interaction_id__gt=min_id)
|
||||||
).order_by("id")
|
).order_by("id")
|
||||||
else:
|
else:
|
||||||
queryset = queryset.order_by("-id")
|
queryset = queryset.order_by("-id")
|
||||||
|
|
Loading…
Reference in New Issue