ensuring we use the application context for the datastore to avoid any local activity leaks
This commit is contained in:
parent
d77e18f810
commit
3212bc2266
@ -40,7 +40,7 @@ private class MappedPreferenceDataStoreSingletonDelegate : ReadOnlyProperty<Cont
|
|||||||
{ key ->
|
{ key ->
|
||||||
dataStoreCache.getOrPut(key) {
|
dataStoreCache.getOrPut(key) {
|
||||||
PreferenceDataStoreFactory.create {
|
PreferenceDataStoreFactory.create {
|
||||||
context.preferencesDataStoreFile(key)
|
context.applicationContext.preferencesDataStoreFile(key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user