From cc258087427f228492ce90cdbde671888d3187a5 Mon Sep 17 00:00:00 2001 From: Xylight Date: Mon, 2 Sep 2024 17:46:28 -0700 Subject: [PATCH] misc: improve pagination --- src/lib/components/lemmy/comment/Comment.svelte | 3 ++- src/lib/components/ui/Pageination.svelte | 2 +- src/routes/inbox/+page.svelte | 6 +++--- src/routes/inbox/+page.ts | 8 +++++++- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/lib/components/lemmy/comment/Comment.svelte b/src/lib/components/lemmy/comment/Comment.svelte index 90774259..5291649f 100644 --- a/src/lib/components/lemmy/comment/Comment.svelte +++ b/src/lib/components/lemmy/comment/Comment.svelte @@ -123,7 +123,8 @@ class="h-full flex items-center justify-center gap-1 ml-auto w-max mr-2" > {#if node.children.length > 0} - + {/if} diff --git a/src/routes/inbox/+page.svelte b/src/routes/inbox/+page.svelte index acaf77de..5fa4d589 100644 --- a/src/routes/inbox/+page.svelte +++ b/src/routes/inbox/+page.svelte @@ -127,7 +127,7 @@ -
+
{#if !data.data || (data.data?.length ?? 0) == 0} searchParam($page.url, 'page', p.detail.toString())} /> diff --git a/src/routes/inbox/+page.ts b/src/routes/inbox/+page.ts index 302d246f..8e97cb92 100644 --- a/src/routes/inbox/+page.ts +++ b/src/routes/inbox/+page.ts @@ -58,5 +58,11 @@ export async function load({ url, fetch }) { publishedToDate(a.published).getTime() ) - return { unreadOnly: unreadOnly, type: type, page: page, data: data } + return { + unreadOnly: unreadOnly, + type: type, + page: page, + data: data, + limit: 20, + } }