Skip to content

Commit a796a8a

Browse files
committed
category: fix category search in explore
This is a change that replicates the fix done via PR #6093. This is based over v5.1.1 as the fix seems necessary for the category search to work properly on the explore screen.
1 parent 391408e commit a796a8a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/src/main/java/fr/free/nrw/commons/category/CategoryClient.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class CategoryClient
124124
}.map {
125125
it
126126
.filter { page ->
127-
!page.categoryInfo().isHidden
127+
page.categoryInfo() == null || !page.categoryInfo().isHidden
128128
}.map {
129129
CategoryItem(
130130
it.title().replace(CATEGORY_PREFIX, ""),

app/src/main/java/fr/free/nrw/commons/wikidata/mwapi/MwQueryPage.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class MwQueryPage extends BaseModel {
3636
return title;
3737
}
3838

39-
@NonNull public CategoryInfo categoryInfo() {
39+
public CategoryInfo categoryInfo() {
4040
return categoryinfo;
4141
}
4242

0 commit comments

Comments
 (0)