Hide remote list chip on subtasks

gtask_related_email
Alex Baker 6 years ago
parent f8518742f8
commit 82bf41c2de

@ -203,6 +203,7 @@ public class ViewHolder extends RecyclerView.ViewHolder {
void bindView(TaskContainer task, boolean isRemoteList) { void bindView(TaskContainer task, boolean isRemoteList) {
this.task = task; this.task = task;
this.isRemoteList = isRemoteList; this.isRemoteList = isRemoteList;
this.indent = task.indent;
nameView.setText(task.getTitle()); nameView.setText(task.getTitle());
hidden.setVisibility(task.isHidden() ? View.VISIBLE : View.GONE); hidden.setVisibility(task.isHidden() ? View.VISIBLE : View.GONE);
@ -274,12 +275,12 @@ public class ViewHolder extends RecyclerView.ViewHolder {
private void setupTags() { private void setupTags() {
String tags = task.getTagsString(); String tags = task.getTagsString();
List<String> tagUuids = tags != null ? newArrayList(tags.split(",")) : Lists.newArrayList(); List<String> tagUuids = tags != null ? newArrayList(tags.split(",")) : Lists.newArrayList();
boolean hideListChip = isRemoteList || indent > 0;
List<Chip> chips = List<Chip> chips =
chipProvider.getChips( chipProvider.getChips(
context, context,
isRemoteList ? null : task.getCaldav(), hideListChip ? null : task.getCaldav(),
isRemoteList ? null : task.getGoogleTaskList(), hideListChip ? null : task.getGoogleTaskList(),
tagUuids); tagUuids);
if (chips.isEmpty()) { if (chips.isEmpty()) {
chipGroup.setVisibility(View.GONE); chipGroup.setVisibility(View.GONE);

Loading…
Cancel
Save