ensuring we use the application context for the datastore to avoid any local activity leaks

This commit is contained in:
Adam Brown 2022-02-01 13:40:35 +00:00
parent d77e18f810
commit 3212bc2266
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ private class MappedPreferenceDataStoreSingletonDelegate : ReadOnlyProperty<Cont
{ key ->
dataStoreCache.getOrPut(key) {
PreferenceDataStoreFactory.create {
context.preferencesDataStoreFile(key)
context.applicationContext.preferencesDataStoreFile(key)
}
}
}