From acba53a354be108e9ab86f428c4230ad79a9a0f7 Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 8 Apr 2025 21:50:07 +0100 Subject: [PATCH] fix preload repeatBoost checking logic --- internal/cache/timeline/status.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/cache/timeline/status.go b/internal/cache/timeline/status.go index b1334e2e1..9f0af9cdc 100644 --- a/internal/cache/timeline/status.go +++ b/internal/cache/timeline/status.go @@ -291,8 +291,9 @@ func (t *StatusTimeline) preload( if id := value.BoostOfID; id != "" { // Check if seen recently. - last := recentBoosts[id] - value.repeatBoost = (last < 40) + last, ok := recentBoosts[id] + repeat := ok && (idx-last) < 40 + value.repeatBoost = repeat // Update last-seen idx. recentBoosts[id] = idx