Filtering DB items.
This commit is contained in:
parent
3b8f4991e9
commit
d0d82751e2
@ -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