android / android/architecture-samples

[Data layer codelab] Section 7 (Create the task repository) should reuse mapped data

Open
#994 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.