Tutorial 2: Checklists - No reminder if item is done

If I set a reminder to wash the car on Thursday, and then get it washed on Wednesday and mark the item done, I don’t want the reminder on Thursday to pop up!

So I think the “checked” property of the ChecklistItem should also be included in the test for scheduling. This means in the ChecklistItem, changing the test in func scheduleNotification():
if shouldRemind && dueDate > Date() {
if !checked && shouldRemind && dueDate > Date() {

It also means adding a call to scheduleNotification when the checked status gets changed. Fortunately there is already a func ToggleCheck() in ChecklistItem, which gets called by CheckListViewController to change the checked status. So that can just be changed to
func toggleCheck() {
checked = !checked

It makes more sense to me with that addition.

Sounds like a good addition to the app. :smile: