Skip updating web UI when browser tab isn't visible

This will save bandwith and battery on the hotspot in cases where the UI
tab is left open. See #564.
This commit is contained in:
Simon Fondrie-Teitler
2025-08-27 13:32:37 -04:00
committed by Markus Unterwaditzer
parent 56dcfdb47c
commit f49d11f034

View File

@@ -20,6 +20,11 @@
$effect(() => {
const interval = setInterval(async () => {
try {
// Don't update UI if browser tab isn't visible
if (document.hidden) {
return;
}
await manager.update();
let new_manifest = await get_manifest();
await new_manifest.set_analysis_status(manager);