From f96a95bcc9fef9958c8020a7c12b7ff7221e6d25 Mon Sep 17 00:00:00 2001 From: SnowCait Date: Mon, 30 Oct 2023 06:33:43 +0900 Subject: [PATCH] Refactor cached_at --- web/src/routes/(app)/home/FollowingTimeline.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/routes/(app)/home/FollowingTimeline.svelte b/web/src/routes/(app)/home/FollowingTimeline.svelte index 0461df4eb..e2086ba8b 100644 --- a/web/src/routes/(app)/home/FollowingTimeline.svelte +++ b/web/src/routes/(app)/home/FollowingTimeline.svelte @@ -71,11 +71,11 @@ }); const storage = new WebStorage(localStorage); - const cachedAt = storage.get('cached_at'); + const cachedAt = storage.getCachedAt(); const authorFilter: Filter = { kinds: [...new Set(authorReplaceableKinds.map(({ kind }) => kind))], authors: [$pubkey], - since: cachedAt === null ? now : Number(cachedAt) + since: cachedAt ?? now }; console.log('[author filter]', authorFilter, new Date((authorFilter.since ?? 0) * 1000));