mirror of
https://github.com/go-gitea/gitea
synced 2025-07-08 03:27: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});
|
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
|
||||||
|
if (stopwatchTippy.state.isShown) {
|
||||||
stopwatchTippy.hide();
|
stopwatchTippy.hide();
|
||||||
stopwatchTippy.show();
|
stopwatchTippy.show();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
updateUi();
|
updateUi();
|
||||||
updateTimeIntervalId = setInterval(updateUi, 1000);
|
updateTimeIntervalId = setInterval(updateUi, 1000);
|
||||||
|
Reference in New Issue
Block a user