fix preload repeatBoost checking logic

This commit is contained in:
kim 2025-04-08 21:50:07 +01:00
parent 31f9829c15
commit d75bbfee3b

View file

@ -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