mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 09:22:25 -05:00 
			
		
		
		
	fix preload repeatBoost checking logic
This commit is contained in:
		
					parent
					
						
							
								a76ac5e098
							
						
					
				
			
			
				commit
				
					
						acba53a354
					
				
			
		
					 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 != "" { | 		if id := value.BoostOfID; id != "" { | ||||||
| 
 | 
 | ||||||
| 			// Check if seen recently. | 			// Check if seen recently. | ||||||
| 			last := recentBoosts[id] | 			last, ok := recentBoosts[id] | ||||||
| 			value.repeatBoost = (last < 40) | 			repeat := ok && (idx-last) < 40 | ||||||
|  | 			value.repeatBoost = repeat | ||||||
| 
 | 
 | ||||||
| 			// Update last-seen idx. | 			// Update last-seen idx. | ||||||
| 			recentBoosts[id] = idx | 			recentBoosts[id] = idx | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue