Skip to content

Commit

Permalink
refactor: only call task completed when completed
Browse files Browse the repository at this point in the history
Task removed can be called by task completed.
We are now making this differentiation since 5c43ecc
because we do not want toast messages
when the network changes.
  • Loading branch information
raoulvdberge committed Jan 27, 2025
1 parent 9d1c825 commit a54bb59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public void taskRemoved(final Task task) {

@Override
public void taskCompleted(final Task task) {
// no op
taskRemoved(task);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ private boolean stepTask(final Task task,
}
if (completed) {
cleanupTask(task, storage);
parents.forEach(parent -> {
parent.taskCompleted(task);
parent.taskRemoved(task);
});
parents.forEach(parent -> parent.taskCompleted(task));
} else if (changed) {
parents.forEach(parent -> parent.taskChanged(task));
}
Expand Down

0 comments on commit a54bb59

Please sign in to comment.