Skip to content

Commit bc5898c

Browse files
committed
Show toggle button only when completed todos exist
Wrapped the toggle button in a conditional to display it only if there are completed todos in the current project filter. This prevents showing the toggle when there are no completed tasks to display.
1 parent 40d5486 commit bc5898c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/taskhub/ui/buttons/ToggleCompletedTodos.tid

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
title: $:/plugins/mabuqian/TaskHub/ui/buttons/ToggleCompletedTodos
22

3-
\define lingo-base() $:/language/TaskHub/
3+
\procedure lingo-base() $:/language/TaskHub/
44

5+
<%if [subfilter{!!tmo_projectFilter}!tmo_taskState[todo]count[]!match[0]] %>
56
<$vars stateTiddler=<<qualify "$:/state/TaskHub/show-completed">>
67
default={{$:/config/TaskHub/ShowCompletedTodos}}>
78

@@ -25,4 +26,5 @@ title: $:/plugins/mabuqian/TaskHub/ui/buttons/ToggleCompletedTodos
2526
/>
2627
</div>
2728
</$reveal>
28-
</$vars>
29+
</$vars>
30+
<%endif%>

0 commit comments

Comments
 (0)