Repository Unit Tests #50
@ -457,9 +457,8 @@ class Repository(private val api: SelfossApi, private val appSettingsService: Ap
|
||||
val newItems = getMaxItemsForBackground(ItemType.UNREAD)
|
||||
val allItems = getMaxItemsForBackground(ItemType.ALL)
|
||||
AmineB marked this conversation as resolved
Outdated
|
||||
val starredItems = getMaxItemsForBackground(ItemType.STARRED)
|
||||
val fullItemsList = newItems + allItems + starredItems
|
||||
insertDBItems(fullItemsList)
|
||||
return fullItemsList
|
||||
insertDBItems(newItems + allItems + starredItems)
|
||||
return newItems
|
||||
AmineB marked this conversation as resolved
Outdated
AmineB
commented
This is useless. This is useless.
|
||||
} catch (e: Throwable) {
|
||||
// We do nothing
|
||||
}
|
||||
AmineB
commented
As the function name describes, this must only return the new items. As the function name describes, this must only return the new items.
davidoskky
commented
Ops, you're right I made a mistake while changing things... Ops, you're right I made a mistake while changing things...
|
||||
|
Loading…
Reference in New Issue
Block a user
I think that the DB handles the duplicates.
Does it use the id to check for duplicates? If that is the case then all is good.