class UserPreferencesRepository(
private val userPreferencesStore: DataStore<UserPreferences>,
...
) { ... }
There is no way to pass DataStore<UserPreferences> through delegate. This needs to be updated to DataStore<Preferences>
It doesn't mention where updateShowCompleted & userPreferencesFlow should be added. These method/variable make use of dataStore so feels like they belong in TasksActivity. maybe it's confusing because variable name used in UserPreferencesRepository as userPreferencesStore.
In codelab's Chapter 6: Persisting data in Preferences DataStore
updateShowCompleted
&userPreferencesFlow
should be added. These method/variable make use ofdataStore
so feels like they belong inTasksActivity
. maybe it's confusing because variable name used inUserPreferencesRepository
asuserPreferencesStore
.