Skip to content

Commit c746b6a

Browse files
authored
Merge pull request #598 from takagimeow/fix/clean-up-unused-update-topics
Clean up unused updateTopics and updateNewsResources methods
2 parents c8b7766 + d56d8e1 commit c746b6a

File tree

2 files changed

+0
-11
lines changed
  • core
    • database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao
    • data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles

2 files changed

+0
-11
lines changed

core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestTopicDao.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ class TestTopicDao : TopicDao {
5353
return topicEntities.map { it.id.toLong() }
5454
}
5555

56-
override suspend fun updateTopics(entities: List<TopicEntity>) {
57-
throw NotImplementedError("Unused in tests")
58-
}
59-
6056
override suspend fun upsertTopics(entities: List<TopicEntity>) {
6157
// Overwrite old values with new values
6258
entitiesStateFlow.update { oldValues ->

core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/TopicDao.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import androidx.room.Dao
2020
import androidx.room.Insert
2121
import androidx.room.OnConflictStrategy
2222
import androidx.room.Query
23-
import androidx.room.Update
2423
import androidx.room.Upsert
2524
import com.google.samples.apps.nowinandroid.core.database.model.TopicEntity
2625
import kotlinx.coroutines.flow.Flow
@@ -58,12 +57,6 @@ interface TopicDao {
5857
@Insert(onConflict = OnConflictStrategy.IGNORE)
5958
suspend fun insertOrIgnoreTopics(topicEntities: List<TopicEntity>): List<Long>
6059

61-
/**
62-
* Updates [entities] in the db that match the primary key, and no-ops if they don't
63-
*/
64-
@Update
65-
suspend fun updateTopics(entities: List<TopicEntity>)
66-
6760
/**
6861
* Inserts or updates [entities] in the db under the specified primary keys
6962
*/

0 commit comments

Comments
 (0)