Skip to content

Commit aecce69

Browse files
committed
This makes more sense.
1 parent 4e0d5f0 commit aecce69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Week 04/UILabs/app/src/main/java/course/labs/todomanager/ToDoListAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ public View getView(int position, View convertView, ViewGroup parent) {
9898
public void onCheckedChanged(CompoundButton buttonView,
9999
boolean isChecked) {
100100
log("Entered onCheckedChanged()");
101-
buttonView.setChecked(isChecked);
102-
101+
ToDoItem.Status status = isChecked ? ToDoItem.Status.DONE : ToDoItem.Status.NOTDONE;
102+
toDoItem.setStatus(status);
103103
}
104104
});
105105

0 commit comments

Comments
 (0)