android / android/architecture-samples

suspend fun refresh() { val networkTasks = networkDataSource.loadTasks() localDataSource.deleteAll() val localTasks = withContext(dispatcher) { networkTasks.toLocal() } localDataSource.upsertAll(localTasks) // Fixed this line }

Open
#1,049 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

suspend fun refresh() {
val networkTasks = networkDataSource.loadTasks()
localDataSource.deleteAll()
val localTasks = withContext(dispatcher) {
networkTasks.toLocal()
}
localDataSource.upsertAll(localTasks) // Fixed this line
}

Contributor guide

Open the contributing guide

Research direction

Start by locating the sample's refresh implementation and any tests covering network and local task synchronization. The issue only provides a refresh snippet and does not state the defect, desired behavior, or acceptance criteria, so completion cannot be determined until those details are clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
data, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.