mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Hidden categories are not showed in suggested categories (#3853)
This commit is contained in:
parent
8630ba8025
commit
67beb947c5
3 changed files with 20 additions and 3 deletions
|
|
@ -92,8 +92,9 @@ class CategoryClient @Inject constructor(private val categoryInterface: Category
|
|||
it.query()?.pages() ?: emptyList()
|
||||
}
|
||||
.map {
|
||||
it.map { page -> page.title().replace(CATEGORY_PREFIX, "") }
|
||||
it.filter {
|
||||
page -> page.categoryInfo() == null || !page.categoryInfo().isHidden
|
||||
}.map { page -> page.title().replace(CATEGORY_PREFIX, "") }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public interface CategoryInterface {
|
|||
* @return
|
||||
*/
|
||||
@GET("w/api.php?action=query&format=json&formatversion=2"
|
||||
+ "&generator=allcategories")
|
||||
+ "&generator=allcategories&prop=categoryinfo")
|
||||
Single<MwQueryResponse> searchCategoriesForPrefix(@Query("gacprefix") String prefix,
|
||||
@Query("gaclimit") int itemLimit, @Query("gacoffset") int offset);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue