mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	only refresh when shown
This commit is contained in:
		| @@ -165,8 +165,10 @@ function updateStopwatchTime(seconds) { | |||||||
|     const dur = prettyMilliseconds(secs * 1000 + delta, {compact: true}); |     const dur = prettyMilliseconds(secs * 1000 + delta, {compact: true}); | ||||||
|     if (stopwatch) stopwatch.textContent = dur; |     if (stopwatch) stopwatch.textContent = dur; | ||||||
|     // refresh the tippy so that the triangle updates to the correct position |     // refresh the tippy so that the triangle updates to the correct position | ||||||
|     stopwatchTippy.hide(); |     if (stopwatchTippy.state.isShown) { | ||||||
|     stopwatchTippy.show(); |       stopwatchTippy.hide(); | ||||||
|  |       stopwatchTippy.show(); | ||||||
|  |     } | ||||||
|   }; |   }; | ||||||
|   updateUi(); |   updateUi(); | ||||||
|   updateTimeIntervalId = setInterval(updateUi, 1000); |   updateTimeIntervalId = setInterval(updateUi, 1000); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user