android / android/architecture-samples
[Data layer codelab] Section 7 (Create the task repository) should reuse mapped data
- Dominant language
- Kotlin
- Stars
- 45.8k
- Forks
- 11.9k
- PR merge metrics
- No merged PRs in 30d
Description
Here:
`suspend fun refresh() {
val networkTasks = networkDataSource.loadTasks()
localDataSource.deleteAll()
val localTasks = withContext(dispatcher) {
networkTasks.toLocal()
}
localDataSource.upsertAll(networkTasks.toLocal())
}`
The last line should probably read:
`localDataSource.upsertAll(networkTasks.toLocal())`
Contributor guide
Research direction
Start in the Section 7 data layer codelab at the suspend refresh() function and compare the mapped localTasks value with the argument passed to localDataSource.upsertAll(). Done means the already-mapped local data is reused consistently in the repository example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100