mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-11 13:47:38 +01:00
The phone only pushed its log on screen-init, app resume/pause, or manual "Sync now" -- never on the log action itself -- so a meal could sit locally for many minutes before reaching GitHub (and thus the PC gate). Fire the existing best-effort _autoSync right after a meal is logged, from both the quick-log path (_onLogMeal) and the meal-builder return (_onBuildMeal), so an online device propagates a new meal within seconds. _autoSync is already single-flight and swallows offline/transient failures, so this is a fire-and-forget unawaited call with no new machinery. Offline logging still waits for reconnect + a lifecycle event (a WorkManager backstop is a future follow-up). Verified on device (BL9000EEA0000102): logging a meal advanced the phone's remote food_log.json commit within seconds. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FtSmzACzJSGyEatgK9exkd |
||
|---|---|---|
| .. | ||
| .agents/skills | ||
| android | ||
| lib | ||
| linux | ||
| test | ||
| .gitignore | ||
| .metadata | ||
| analysis_options.yaml | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| README.md | ||
| skills-lock.json | ||
diet_guard_app
A new Flutter project.
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.