diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/AppModules.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/AppModules.kt index e9e7c6f6f..cf9256dc4 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/AppModules.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/AppModules.kt @@ -129,13 +129,6 @@ class AppModules( OtsSharedPreferences(appContext, applicationIOScope) } - init { - applicationIOScope.launch { - // Eagerly initialize OtsSharedPreferences off the main thread - otsPrefs - } - } - // App services that should be run as soon as there are subscribers to their flows val locationManager = LocationState(appContext, applicationIOScope) val connManager = ConnectivityManager(appContext, applicationIOScope) @@ -406,6 +399,11 @@ class AppModules( delay(3000) videoCache } + + applicationIOScope.launch { + // Eagerly initialize OtsSharedPreferences off the main thread + otsPrefs + } } fun terminate(appContext: Context) {