This commit is contained in:
syuilo 2025-05-02 16:13:16 +09:00
parent ef82d103ff
commit 7b5634908b
2 changed files with 3 additions and 2 deletions

View File

@ -149,6 +149,7 @@ const POLLING_INTERVAL =
MIN_POLLING_INTERVAL; MIN_POLLING_INTERVAL;
if (!store.s.realtimeMode) { if (!store.s.realtimeMode) {
// TODO: 1TL
useInterval(async () => { useInterval(async () => {
paginator.fetchNewer({ paginator.fetchNewer({
toQueue: !isTop(), toQueue: !isTop(),

View File

@ -54,7 +54,7 @@ export function usePagination<T extends MisskeyEntity>(props: {
// パラメータに何らかの変更があった際、再読込したいチャンネル等のIDが変わったなど // パラメータに何らかの変更があった際、再読込したいチャンネル等のIDが変わったなど
watch(() => [props.ctx.endpoint, props.ctx.params], init, { deep: true }); watch(() => [props.ctx.endpoint, props.ctx.params], init, { deep: true });
function getNewestId() { function getNewestId(): string | null | undefined {
// 様々な要因により並び順は保証されないのでソートが必要 // 様々な要因により並び順は保証されないのでソートが必要
if (aheadQueue.length > 0) { if (aheadQueue.length > 0) {
return aheadQueue.map(x => x.id).sort().at(-1); return aheadQueue.map(x => x.id).sort().at(-1);
@ -62,7 +62,7 @@ export function usePagination<T extends MisskeyEntity>(props: {
return items.value.map(x => x.id).sort().at(-1); 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); return items.value.map(x => x.id).sort().at(0);
} }