mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 23:49:59 -07:00
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:
committed by
Markus Unterwaditzer
parent
56dcfdb47c
commit
f49d11f034
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user