From ea1a492dc0e83aa44ffd9e5aa90abb1a0aa22b22 Mon Sep 17 00:00:00 2001 From: mae taylor Date: Tue, 15 Jul 2025 16:42:21 +0100 Subject: [PATCH] fix: timing update on timeline fetcher --- src/lib/timeline.js | 11 +++++------ src/lib/ui/Navigation.svelte | 5 ++++- src/routes/favourites/+page.svelte | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/lib/timeline.js b/src/lib/timeline.js index 6b6050f..68aa2b2 100644 --- a/src/lib/timeline.js +++ b/src/lib/timeline.js @@ -16,8 +16,10 @@ export async function getTimeline(timelineType = "home", clean, localOnly = fals if (loading) return; // no spamming!! loading = true; - // if (!clean && get(timeline).length > 0) - // last_post = get(timeline)[get(timeline).length - 1].id; + if(clean) { + timeline.set([]); + last_post = false; + } let timeline_data; switch(timelineType) { @@ -47,10 +49,7 @@ export async function getTimeline(timelineType = "home", clean, localOnly = fals return; } - if (clean) { - timeline.set([]); - last_post = false; - } else { + if (!clean) { last_post = timeline_data.next.url.searchParams.get("max_id") } diff --git a/src/lib/ui/Navigation.svelte b/src/lib/ui/Navigation.svelte index 384450d..b0fa105 100644 --- a/src/lib/ui/Navigation.svelte +++ b/src/lib/ui/Navigation.svelte @@ -124,7 +124,10 @@
-