Cache items in background without filtering
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
@ -109,9 +109,9 @@ class Repository(private val api: SelfossApi, private val appSettingsService: Ap
|
||||
val items = api.getItems(
|
||||
itemType.type,
|
||||
0,
|
||||
tagFilter?.tag,
|
||||
sourceFilter?.id?.toLong(),
|
||||
searchFilter,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
200
|
||||
)
|
||||
@ -455,7 +455,7 @@ class Repository(private val api: SelfossApi, private val appSettingsService: Ap
|
||||
private fun updateDBItem(item: SelfossModel.Item) =
|
||||
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> {
|
||||
try {
|
||||
val newItems = getMaxItemsForBackground(ItemType.UNREAD)
|
||||
|
Reference in New Issue
Block a user