DB caching. #33
@ -64,7 +64,11 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
|
||||
)
|
||||
} else {
|
||||
if (itemsCaching) {
|
||||
fetchedItems = getDBItems().map { it.toView() }
|
||||
fetchedItems = getDBItems().filter {
|
||||
displayedItems == ItemType.ALL ||
|
||||
(it.unread && displayedItems == ItemType.UNREAD) ||
|
||||
(it.starred && displayedItems == ItemType.STARRED)
|
||||
}.map { it.toView() }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user