Fix infinite spinner on guide screen and allow cleartext HTTP in debug

Two bugs combined to cause this: (1) Android blocks plain-HTTP traffic
by default since API 28, so every call to our HTTP-only local backend
was throwing and being silently swallowed; (2) GuideViewModel's
loadNearby() returned early on that exception without ever setting
isLoading = false, so the spinner never cleared and no error showed.

Fix: debug-only manifest override (src/debug/AndroidManifest.xml)
enables cleartext traffic for local dev against the Docker backend;
GuideViewModel now always resolves isLoading and surfaces a
errorMessage + retry() the UI can act on instead of hanging forever.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-07-09 19:51:58 +00:00
parent 3f5a857c5a
commit 188bf01d6e
5 changed files with 60 additions and 12 deletions

View file

@ -17,6 +17,7 @@
<string name="map_search_placeholder">Введите место для поиска…</string>
<string name="guide_no_places_nearby">Поблизости пока не найдено интересных мест.</string>
<string name="guide_retry">Повторить</string>
<string name="guide_favorite_add">Добавить в избранное</string>
<string name="guide_favorite_remove">Убрать из избранного</string>
<string name="guide_mute">Выключить озвучку</string>