Merge pull request #598 from takagimeow/fix/clean-up-unused-update-topics

Clean up unused updateTopics and updateNewsResources methods
pull/698/head
Milosz Moczkowski 1 year ago committed by GitHub
commit c746b6afcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -53,10 +53,6 @@ class TestTopicDao : TopicDao {
return topicEntities.map { it.id.toLong() }
}
override suspend fun updateTopics(entities: List<TopicEntity>) {
throw NotImplementedError("Unused in tests")
}
override suspend fun upsertTopics(entities: List<TopicEntity>) {
// Overwrite old values with new values
entitiesStateFlow.update { oldValues ->

@ -20,7 +20,6 @@ import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import androidx.room.Upsert
import com.google.samples.apps.nowinandroid.core.database.model.TopicEntity
import kotlinx.coroutines.flow.Flow
@ -58,12 +57,6 @@ interface TopicDao {
@Insert(onConflict = OnConflictStrategy.IGNORE)
suspend fun insertOrIgnoreTopics(topicEntities: List<TopicEntity>): List<Long>
/**
* Updates [entities] in the db that match the primary key, and no-ops if they don't
*/
@Update
suspend fun updateTopics(entities: List<TopicEntity>)
/**
* Inserts or updates [entities] in the db under the specified primary keys
*/

Loading…
Cancel
Save