icon for category with one filter

This commit is contained in:
veliymolfar 2020-04-27 13:30:39 +03:00
parent 0300b0b612
commit 821700b59b

View file

@ -338,14 +338,11 @@ public class QuickSearchListItem {
if (categories.size() == 1) {
String res = "";
PoiCategory category = categories.get(0);
LinkedHashSet<String> f = acceptedTypes.get(category);
List<String> filters;
if (f != null) {
filters = new ArrayList<>(f);
if (filters.size() == 1) {
res = getPoiTypeIconName(category.getPoiTypeByKeyName(filters.get(0)));
} else {
LinkedHashSet<String> filters = acceptedTypes.get(category);
if (filters == null || filters.size() > 1) {
res = category.getIconKeyName();
} else {
res = getPoiTypeIconName(category.getPoiTypeByKeyName(filters.iterator().next()));
}
if (res != null && RenderingIcons.containsBigIcon(res)) {
iconId = RenderingIcons.getBigIconResourceId(res);
@ -353,7 +350,6 @@ public class QuickSearchListItem {
}
}
}
}
if (iconId > 0) {
return getIcon(app, iconId);
} else {