diet-guard/app/lib/screens
Krzysztof kuhy Rudnicki 16ca5227f6
Some checks are pending
pre-commit / pre-commit (push) Waiting to run
Tests / test (3.10) (push) Waiting to run
Tests / test (3.11) (push) Waiting to run
Tests / test (3.12) (push) Waiting to run
app: push immediately when a meal is logged
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
2026-07-11 18:55:06 +02:00
..
edit_entry_screen.dart Add food bank, edit-entry, and app settings screens; history redesign 2026-07-04 05:18:32 +02:00
food_bank_screen.dart Add food bank, edit-entry, and app settings screens; history redesign 2026-07-04 05:18:32 +02:00
history_screen.dart Add food bank, edit-entry, and app settings screens; history redesign 2026-07-04 05:18:32 +02:00
log_meal_screen.dart app: push immediately when a meal is logged 2026-07-11 18:55:06 +02:00
meal_builder_screen.dart Add photo attach, full-size viewer, and a minimal history screen 2026-06-22 18:57:58 +02:00
photo_viewer_screen.dart Add photo attach, full-size viewer, and a minimal history screen 2026-06-22 18:57:58 +02:00
settings_screen.dart Migrate sync to shared crdt_sync library (Python + Dart) 2026-07-10 23:49:43 +02:00