Show subtask chip even if list chips disabled

pull/996/head
Alex Baker 6 years ago
parent a0b8338cec
commit 55911097cf

@ -196,9 +196,7 @@ public class ViewHolder extends RecyclerView.ViewHolder {
hiddenIcon.setVisibility(task.isHidden() ? View.VISIBLE : View.GONE);
setupTitleAndCheckbox();
setupDueDate();
if (preferences.getBoolean(R.string.p_show_list_indicators, true)) {
setupChips(filter);
}
if (preferences.getBoolean(R.string.p_show_description, true)) {
description.setText(task.getNotes());
description.setVisibility(task.hasNotes() ? View.VISIBLE : View.GONE);

@ -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;

Loading…
Cancel
Save