caio.co/de/chuva

Record lastTick after content swap

Just to that I updates correctly when I switch tabs like a madman
Id
9b9f5e4025dd5927175cea8be95443d6c317a14f
Author
Caio
Commit time
2025-12-01T09:20:14+01:00

Modified moros/templates/static/app.js

@@ -6,7 +6,6
function initApp() {
document.addEventListener('visibilitychange', () => {
if (document.visibilityState === "hidden") {
- lastTick = Date.now();
if (typeof tickerId !== "undefined") {
clearTimeout(tickerId);
tickerId = undefined;
@@ -35,6 +34,7
if (typeof error !== "undefined") {
setError(error);
} else {
+ lastTick = Date.now();
tick(tickDelay);
}
});