Skip to content

Commit

Permalink
[RFR-799] Fix settings lost on restart
Browse files Browse the repository at this point in the history
  • Loading branch information
hb0 committed Sep 19, 2023
1 parent 2a2bfc7 commit c4c201d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class AppSettings(context: Context) {
private val dataStore: DataStore<Settings> = MultiProcessDataStoreFactory.create(
serializer = SettingsSerializer,
produceFile = {
File("${appContext.cacheDir.path}/settings.pb")
// With cacheDir the settings are lost on app restart [RFR-799]
File("${appContext.filesDir.path}/settings.pb")
},
migrations = listOf(
PreferencesMigrationFactory.create(appContext),
Expand Down

0 comments on commit c4c201d

Please sign in to comment.