From 7b5634908bd154888a7a11a85f434ed3e83dd667 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 2 May 2025 16:13:16 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=8C=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/components/MkTimeline.vue | 1 + packages/frontend/src/use/use-pagination.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue index 7b083831b1..dc2dc330dd 100644 --- a/packages/frontend/src/components/MkTimeline.vue +++ b/packages/frontend/src/components/MkTimeline.vue @@ -149,6 +149,7 @@ const POLLING_INTERVAL = MIN_POLLING_INTERVAL; if (!store.s.realtimeMode) { + // TODO: 先頭のノートの作成日時が1日以上前であれば流速が遅いTLと見做してインターバルを通常より延ばす useInterval(async () => { paginator.fetchNewer({ toQueue: !isTop(), diff --git a/packages/frontend/src/use/use-pagination.ts b/packages/frontend/src/use/use-pagination.ts index 645433290d..ec34d38901 100644 --- a/packages/frontend/src/use/use-pagination.ts +++ b/packages/frontend/src/use/use-pagination.ts @@ -54,7 +54,7 @@ export function usePagination(props: { // パラメータに何らかの変更があった際、再読込したい(チャンネル等のIDが変わったなど) watch(() => [props.ctx.endpoint, props.ctx.params], init, { deep: true }); - function getNewestId() { + function getNewestId(): string | null | undefined { // 様々な要因により並び順は保証されないのでソートが必要 if (aheadQueue.length > 0) { return aheadQueue.map(x => x.id).sort().at(-1); @@ -62,7 +62,7 @@ export function usePagination(props: { return items.value.map(x => x.id).sort().at(-1); } - function getOldestId() { + function getOldestId(): string | null | undefined { // 様々な要因により並び順は保証されないのでソートが必要 return items.value.map(x => x.id).sort().at(0); }