mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-10-03 17:14:33 -04:00
perf(startup): move WorkManager and AppFunctions init off the main thread (#6648)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b5152d14a0
commit
8321df705a
2 files changed
+7
-4
No files matched your search
@@ -17,6 +17,7 @@
|
||||
package org.meshtastic.app
|
||||
|
||||
import androidx.appfunctions.AppFunctionConfiguration
|
||||
import kotlinx.coroutines.launch
|
||||
import org.koin.java.KoinJavaComponent.getKoin
|
||||
import org.meshtastic.app.ai.appfunctions.AppFunctionStateSync
|
||||
import org.meshtastic.app.ai.appfunctions.MeshtasticAppFunctions
|
||||
@@ -36,7 +37,8 @@ class GoogleMeshUtilApplication :
|
||||
// Start the AppFunctions enabled-state sync. Resolved here (after startKoin has bound
|
||||
// androidContext) rather than via createdAtStart so that Koin graphs built outside a
|
||||
// running app — verification tests, previews — stay lazily constructible.
|
||||
getKoin().get<AppFunctionStateSync>()
|
||||
// Off-main: construction forces the AppFunctionsPrefs subgraph and fires AppSearch binder calls.
|
||||
applicationScope.launch { getKoin().get<AppFunctionStateSync>() }
|
||||
}
|
||||
|
||||
override val appFunctionConfiguration: AppFunctionConfiguration
|
||||
|
||||
Reference in new issue
Block a user