Merge pull request #218 from Alys/todo-with-checklist-untick
fix bug where an un-checked to-do with checklist removes only part of reward
This commit is contained in:
Vendored
+1
-1
@@ -13159,7 +13159,7 @@ api.wrap = function(user, main) {
|
||||
return m + (i.completed ? 1 : 0);
|
||||
}), 0) / task.checklist.length;
|
||||
}
|
||||
if (task.type === 'todo' && direction === 'up') {
|
||||
if (task.type === 'todo') {
|
||||
nextDelta *= 1 + _.reduce(task.checklist, (function(m, i) {
|
||||
return m + (i.completed ? 1 : 0);
|
||||
}), 0);
|
||||
|
||||
+1
-1
@@ -792,7 +792,7 @@ api.wrap = (user, main=true) ->
|
||||
if direction is 'down' and task.type is 'daily' and options.cron
|
||||
nextDelta *= (1 - _.reduce(task.checklist,((m,i)->m+(if i.completed then 1 else 0)),0) / task.checklist.length)
|
||||
# If To-Do, point-match the TD per checklist item completed
|
||||
if task.type is 'todo' and direction is 'up'
|
||||
if task.type is 'todo'
|
||||
nextDelta *= (1 + _.reduce(task.checklist,((m,i)->m+(if i.completed then 1 else 0)),0))
|
||||
|
||||
unless task.type is 'reward'
|
||||
|
||||
Reference in New Issue
Block a user