From da8b24135b75760ba76337409d9c8d7f31b41af2 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Thu, 21 Aug 2025 19:13:31 +0900 Subject: [PATCH] fix --- packages/frontend/src/utility/paginator.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/frontend/src/utility/paginator.ts b/packages/frontend/src/utility/paginator.ts index 0aed2ddb2c..e7b556f4e2 100644 --- a/packages/frontend/src/utility/paginator.ts +++ b/packages/frontend/src/utility/paginator.ts @@ -325,7 +325,11 @@ export class Paginator< this.fetchingNewer.value = false; - if (apiRes == null || apiRes.length === 0) return; // これやらないと余計なre-renderが走る + if (apiRes == null || apiRes.length === 0) { + this.canFetchNewer.value = false; + // 余計なre-renderを防止するためここで終了 + return; + } if (options.toQueue) { this.aheadQueue.unshift(...apiRes.toReversed()); @@ -347,13 +351,9 @@ export class Paginator< } else { this.canFetchNewer.value = true; } - } else if (this.canFetchDetection === 'safe' || this.canFetchDetection == null) { - if (apiRes.length === 0) { - this.canFetchNewer.value = false; - } else { - this.canFetchNewer.value = true; - } } + // canFetchDetectionが'safe'の場合・apiRes.length === 0 の場合は apiRes.length === 0 の場合に canFetchNewer.value = false になるが、 + // 余計な re-render を防ぐために上部で処理している。そのため、ここでは何もしない } public trim(trigger = true): void {