π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix(ensu): fall back when advanced settings hydration fails
Prateek Sunala9463a4d0dc8
diff --git a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/AppViewModel.kt b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/AppViewModel.ktindex e0ddac8257..5befdfafb1 100644--- a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/AppViewModel.kt+++ b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/AppViewModel.kt@@ -7,6 +7,7 @@ import android.os.Environmentimport androidx.lifecycle.AndroidViewModelimport androidx.lifecycle.viewModelScopeimport io.ente.ensu.data.AdvancedSettingsDataStore+import io.ente.ensu.data.AdvancedSettingsSnapshotimport io.ente.ensu.data.EndpointPreferencesDataStoreimport io.ente.ensu.data.SessionPreferencesDataStoreimport io.ente.ensu.data.auth.EnsuAuthService@@ -102,7 +103,9 @@ class AppViewModel(application: Application) : AndroidViewModel(application) {}viewModelScope.launch {- val initialSettings = advancedSettingsDataStore.settingsFlow.first()+ val initialSettings = runCatching {+ advancedSettingsDataStore.settingsFlow.first()+ }.getOrDefault(AdvancedSettingsSnapshot())store.applyPersistedSettings(developerSettings = initialSettings.developerSettings,modelSettings = initialSettings.modelSettings