feat: prefetch AMSAT status on foreground

Start AMSAT status prefetch when the app enters foreground and share the in-flight request with the status page fetch path to avoid duplicate network requests.
This commit is contained in:
atsunatsu committed 2026-08-28 00:41:32 +08:00
1 parent 7924a6f69e
commit bc6e065804
5 files changed
+88 -25

No files matched your search

@@ -50,6 +50,9 @@ class MainApplication : Application(), IContainerProvider {
private var startedActivityCount = 0
override fun onActivityStarted(activity: Activity) {
if (startedActivityCount == 0) {
container.appScope.launch { container.amSatRepo.prefetchStatus() }
}
startedActivityCount += 1
}