Remove unnecessary return value
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
2022-09-30 09:11:55 +02:00
parent 28b950f467
commit 6f60ef4346
2 changed files with 6 additions and 12 deletions

View File

@ -456,17 +456,16 @@ class Repository(private val api: SelfossApi, private val appSettingsService: Ap
db.itemsQueries.updateItem(item.datetime, item.title.getHtmlDecoded(), item.content, item.unread, item.starred, item.thumbnail, item.icon, item.link, item.sourcetitle, item.tags.joinToString(","), item.id.toString())
// TODO: This function should check for duplicate items
suspend fun tryToCacheItemsAndGetNewOnes(): List<SelfossModel.Item> {
suspend fun tryToCacheItemsAndGetNewOnes() {
try {
val newItems = getMaxItemsForBackground(ItemType.UNREAD)
val allItems = getMaxItemsForBackground(ItemType.ALL)
val starredItems = getMaxItemsForBackground(ItemType.STARRED)
insertDBItems(newItems + allItems + starredItems)
return newItems
val fullItemsList = newItems + allItems + starredItems
insertDBItems(fullItemsList)
} catch (e: Throwable) {
// We do nothing
}
return emptyList()
}
// TODO: Add tests