Skip to content

Commit

Permalink
[RFR-799] Fix settings reset on restart
Browse files Browse the repository at this point in the history
  • Loading branch information
hb0 committed Sep 19, 2023
1 parent b5560ee commit b37afa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ext {
cyfaceAndroidBackendVersion = "0.0.0" // Automatically overwritten by CI

// Cyface dependencies
cyfaceUtilsVersion = "4.0.3"
cyfaceUtilsVersion = "4.0.4"
cyfaceSerializationVersion = "3.0.0"
cyfaceUploaderVersion = "1.0.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class SynchronizationSettings(context: Context, collectorUrl: String, oAuthConfi
private val dataStore: DataStore<Settings> = MultiProcessDataStoreFactory.create(
serializer = SettingsSerializer,
produceFile = {
File("${appContext.cacheDir.path}/synchronization.pb")
// With cacheDir the settings are lost on app restart [RFR-799]
File("${appContext.filesDir.path}/synchronization.pb")
},
migrations = listOf(
PreferencesMigrationFactory.create(appContext, collectorUrl, oAuthConfig),
Expand Down

0 comments on commit b37afa7

Please sign in to comment.