mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 17:17:19 +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});
|
||||
if (stopwatch) stopwatch.textContent = dur;
|
||||
// refresh the tippy so that the triangle updates to the correct position
|
||||
stopwatchTippy.hide();
|
||||
stopwatchTippy.show();
|
||||
if (stopwatchTippy.state.isShown) {
|
||||
stopwatchTippy.hide();
|
||||
stopwatchTippy.show();
|
||||
}
|
||||
};
|
||||
updateUi();
|
||||
updateTimeIntervalId = setInterval(updateUi, 1000);
|
||||
|
Reference in New Issue
Block a user