codelab-android-datastore icon indicating copy to clipboard operation
codelab-android-datastore copied to clipboard

DataStore<Preferences>

Open nynganini opened this issue 3 years ago • 2 comments
trafficstars

When creating UserPreferencesRepository the type should be DataStore<Preferences> instead of DataStore<UserPreferences>

nynganini avatar Apr 19 '22 09:04 nynganini

I have encounter the same problem so I decided to look the finished repository to check how they have done that and they have also written DataStore<Preferences> inside UserPreferencesRepository which is same with your answer.

coodin avatar May 14 '22 09:05 coodin

Looks like they just write code in notepad and commit it, and never correct it either.

ccornici avatar Jul 31 '22 09:07 ccornici

These kind of mistakes can (and do) throw beginners off the wagon really easily. This should be fixed ASAP.

Offending page: https://developer.android.com/codelabs/android-preferences-datastore#5

donnfelker avatar Sep 08 '22 18:09 donnfelker

Thanks, I agree this needs to be fixed asap. Working on it.

mmoczkowski avatar Sep 09 '22 15:09 mmoczkowski

Closing as a duplicate of #45

mmoczkowski avatar Sep 09 '22 15:09 mmoczkowski