mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-04-16 06:14:13 +00:00
fix preload repeatBoost checking logic
This commit is contained in:
parent
31f9829c15
commit
d75bbfee3b
1 changed files with 3 additions and 2 deletions
5
internal/cache/timeline/status.go
vendored
5
internal/cache/timeline/status.go
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue