Fix: Fitbit screen showed no data after a successful sync
All checks were successful
Build & Release APK / build (push) Successful in 2m4s

load() caches by endpoint for the session, so the post-sync refresh
re-served the pre-sync (empty) summary. Sync now invalidates the
fitbit cache keys — the watermark before reading, summary+latest after
uploading — so the refetch actually hits the server.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-08 00:03:17 -07:00
parent c48212bfff
commit 81632a4275
2 changed files with 10 additions and 1 deletions

View File

@@ -98,6 +98,11 @@ export function clearCache() {
cache = {};
}
/* drop specific endpoints from the cache so the next load() refetches */
export function invalidate(...keys: EpKey[]) {
for (const k of keys) delete cache[k];
}
/* ---- auth context ---- */
interface AuthCtx {