allow tasks to stay visible while being edited, even if the edit changes an attribute that would normally cause the task to be hidden
This commit is contained in:
Vendored
+531
-1022
File diff suppressed because it is too large
Load Diff
+10
-4
@@ -245,13 +245,19 @@ api.taskClasses = (task, filters=[], dayStart=0, lastCron=+new Date, showComplet
|
||||
|
||||
# Filters
|
||||
if main # only show when on your own list
|
||||
for filter, enabled of filters
|
||||
if enabled and not task.tags?[filter]
|
||||
# All the other classes don't matter
|
||||
return 'hidden'
|
||||
if !task._editing # always show task being edited (even when tag removed)
|
||||
for filter, enabled of filters
|
||||
if enabled and not task.tags?[filter]
|
||||
# All the other classes don't matter
|
||||
return 'hidden'
|
||||
|
||||
classes = type
|
||||
|
||||
if task._editing
|
||||
classes += " beingEdited" # Assists filtering by third-party themes.
|
||||
# Example: theme normally hides daily when not scheduled for today,
|
||||
# BUT keeps showing daily when being edited to unschedule it for today
|
||||
|
||||
# show as completed if completed (naturally) or not required for today
|
||||
if type in ['todo', 'daily']
|
||||
if completed or (type is 'daily' and !api.shouldDo(+new Date, task.repeat, {dayStart}))
|
||||
|
||||
Reference in New Issue
Block a user