|
|
|
|
@ -42,6 +42,7 @@ public class ChipProvider {
|
|
|
|
|
private final Inventory inventory;
|
|
|
|
|
private final int iconAlpha;
|
|
|
|
|
private final ChipListCache lists;
|
|
|
|
|
private final Preferences preferences;
|
|
|
|
|
private final ColorProvider colorProvider;
|
|
|
|
|
private final Locale locale;
|
|
|
|
|
private final Ordering<TagFilter> orderByName =
|
|
|
|
|
@ -68,6 +69,7 @@ public class ChipProvider {
|
|
|
|
|
iconAlpha =
|
|
|
|
|
(int) (255 * ResourcesCompat.getFloat(activity.getResources(), R.dimen.alpha_secondary));
|
|
|
|
|
this.lists = lists;
|
|
|
|
|
this.preferences = preferences;
|
|
|
|
|
this.colorProvider = colorProvider;
|
|
|
|
|
this.locale = locale;
|
|
|
|
|
|
|
|
|
|
@ -109,6 +111,7 @@ public class ChipProvider {
|
|
|
|
|
if (task.hasChildren()) {
|
|
|
|
|
chips.add(newSubtaskChip(task, !showText));
|
|
|
|
|
}
|
|
|
|
|
if (preferences.getBoolean(R.string.p_show_list_indicators, true)) {
|
|
|
|
|
if (task.hasLocation() && !(filter instanceof PlaceFilter)) {
|
|
|
|
|
Location location = task.getLocation();
|
|
|
|
|
chips.add(newChip(new PlaceFilter(location.getPlace()), R.drawable.ic_outline_place_24px));
|
|
|
|
|
@ -135,6 +138,7 @@ public class ChipProvider {
|
|
|
|
|
orderByName.sortedCopy(filter(transform(tags, lists::getTag), Predicates.notNull())),
|
|
|
|
|
tag -> newChip(tag, R.drawable.ic_outline_label_24px)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
removeIf(chips, Predicates.isNull());
|
|
|
|
|
return chips;
|
|
|
|
|
|