You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/data/src/main/java/com/google/samples/apps/nowinandroid/core/data/repository/OfflineFirstNewsRepository.kt
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -80,8 +80,8 @@ class OfflineFirstNewsRepository @Inject constructor(
80
80
81
81
// TODO: Make this more efficient, there is no need to retrieve populated
82
82
// news resources when all that's needed are the ids
83
-
valexistingFollowedChangedNewsResourceIds=when {
84
-
hasOnBoarded-> newsResourceDao.getNewsResources(
83
+
valexistingNewsResourceIdsThatHaveChanged=when {
84
+
hasOnboarded-> newsResourceDao.getNewsResources(
85
85
useFilterTopicIds =true,
86
86
filterTopicIds = followedTopicIds,
87
87
useFilterNewsIds =true,
@@ -94,6 +94,7 @@ class OfflineFirstNewsRepository @Inject constructor(
94
94
else-> emptySet()
95
95
}
96
96
97
+
// Obtain the news resources which have changed from the network and upsert them locally
0 commit comments