Skip to content

Commit

Permalink
fix(done): Show clearDone button only when done is supported
Browse files Browse the repository at this point in the history
Refs: #1556

Signed-off-by: Stefan Niedermann <[email protected]>
  • Loading branch information
stefan-niedermann committed Jan 19, 2024
1 parent 6fc89e3 commit 7c8bc68
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ private void setVisibilityState() {

Stream.of(
binding.doneCheck,
binding.doneDate,
binding.clearDone
binding.doneDate
).forEach(v -> v.setVisibility(View.VISIBLE));

Stream.of(
Expand All @@ -127,6 +126,7 @@ private void setVisibilityState() {
binding.clearDueDate
).forEach(v -> v.setVisibility(View.GONE));

binding.clearDone.setVisibility(supportsDone ? View.VISIBLE : View.GONE);
binding.doneDueDate.setVisibility(dueDate == null || !isEnabled() ? View.GONE : View.VISIBLE);
}
}
Expand Down

0 comments on commit 7c8bc68

Please sign in to comment.