Files
APKDownloader/app
Rahul Patel 272870ddd2 auth: refresh anonymous session on activity resume
Long-backgrounded sessions (especially on aggressive vendors like Huawei)
could leave the Play token invalid and OkHttp's connection pool full of
dead sockets, producing a perpetual loading spinner with no error.

- ComposeActivity#onStart probes the saved token via isSavedAuthDataValid;
  on failure evicts the OkHttp pool and refreshes anonymous auth.
- AuthProvider gains authReady StateFlow, awaitReady(), and a mutex-guarded
  refreshAnonymousAuth() so concurrent callers don't double-fetch.
- Play-backed ViewModels (AppDetails, DevProfile, MoreApps, Reviews, Search,
  ExpandedStreamBrowse, Category) await refresh completion before issuing
  helper calls, closing the race between resume-time refresh and screen
  LaunchedEffect fetches.
- AppDetailsScreen rendered Error as Loading when app was null; reorder so
  Error wins and wire a Retry button through Placeholder.
- Stream/Review/Search/DevProfile/CategoryBrowse error placeholders gain
  Retry actions wired to PagingItems.retry() or the VM's fetch.
- CategoryViewModel was logging-only on failure; now emits ViewState.Error
  with a matching Retry path in CategoriesPage.
2026-05-29 01:31:48 +05:30
..
2025-08-21 14:45:44 +08:00
2025-08-21 14:45:44 +08:00
2025-08-21 14:45:44 +08:00