Nightscout works on iOS

This commit is contained in:
James Babcock committed 2026-09-18 23:16:22 -07:00
1 parent 68810197a8
commit 5ae2c245c6
7 files changed
+114 -8

No files matched your search

+3 -1
View File
@@ -167,10 +167,12 @@ export class NightscoutBridge {
await this.refreshNow();
return;
}
await this.refreshNow();
// Register polling before awaiting HTTP so stop() during the first fetch
// cannot leave a timer behind, and concurrent starts share one timer.
this.refreshHandle = setInterval(() => {
void this.refreshNow();
}, NIGHTSCOUT_REFRESH_MS);
await this.refreshNow();
}
async stop(): Promise<void> {