android / android/codelab-android-datastore

There might be errors in the description of `updateShowCompleted` in codelab

Open
#73 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
240
Forks
113
PR merge metrics
No merged PRs in 30d

Description

I found two parts of the codelab description that might possibly be errors and report them.

First look at the description in the section on [`Writing data to Proto DataStore`](https://developer.android.com/codelabs/android-proto-datastore#6) in codelab

image

I'm not sure, but perhaps `userPreferencesStore.updateData()` is correct for the red line in the image, not `dataStore.updateData()`.

##
Second, the sample code in the image above is probably incorrect when the language is not English in codelab.
For example, look at the sample code when the codelab language is Japanese
![image](https://github.com/android/codelab-android-datastore/assets/62137820/8cde981f-87c7-4793-a90a-0e3144c9b3cd)

As well as sample code for the English version,

```
dataStore..updateData { ...
```
The above should be modified as follows
```
userPreferencesStore.updateData { ...
```

Contributor guide

Open the contributing guide

Research direction

Start with the “Writing data to Proto DataStore” section of the linked codelab and compare the English and Japanese rendered examples. Check the updateData receiver shown in each snippet, then verify that both language versions consistently use the intended store reference and render without the duplicated dot.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.