mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
check for exact category match on upload search (#5328)
This commit is contained in:
parent
048b78a03a
commit
05fbfce865
1 changed files with 4 additions and 2 deletions
|
|
@ -83,7 +83,8 @@ class CategoriesPresenter @Inject constructor(
|
|||
if (media == null) {
|
||||
return repository.searchAll(term, getImageTitleList(), repository.selectedDepictions)
|
||||
.subscribeOn(ioScheduler)
|
||||
.map { it.filterNot { categoryItem -> repository.containsYear(categoryItem.name) } }
|
||||
.map { it.filter { categoryItem -> !repository.containsYear(categoryItem.name)
|
||||
|| categoryItem.name==term } }
|
||||
} else {
|
||||
return Observable.zip(
|
||||
repository.getCategories(repository.selectedExistingCategories)
|
||||
|
|
@ -97,7 +98,8 @@ class CategoriesPresenter @Inject constructor(
|
|||
}
|
||||
)
|
||||
.subscribeOn(ioScheduler)
|
||||
.map { it.filterNot { categoryItem -> repository.containsYear(categoryItem.name) } }
|
||||
.map { it.filter { categoryItem -> !repository.containsYear(categoryItem.name)
|
||||
|| categoryItem.name==term } }
|
||||
.map { it.filterNot { categoryItem -> categoryItem.thumbnail == "hidden" } }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue