Centralize Create/Read/Update/Delete logic inside ToDoViewModel. Expose a single observable list (LiveData/Flow). UI must call ViewModel intents only (e.g., onAdd(title, desc), onToggle(id), onEdit(id, fields), onDelete(id)), with no data mutations in Activity/Composables. Add or fix VM methods (addNewToDo, updateToDo, toggleCompletionStatus, deleteToDo) and ensure all UI paths are wired to these. Remove any duplicated Activity state and verify state survives configuration changes.
Centralize Create/Read/Update/Delete logic inside ToDoViewModel. Expose a single observable list (LiveData/Flow). UI must call ViewModel intents only (e.g., onAdd(title, desc), onToggle(id), onEdit(id, fields), onDelete(id)), with no data mutations in Activity/Composables. Add or fix VM methods (addNewToDo, updateToDo, toggleCompletionStatus, deleteToDo) and ensure all UI paths are wired to these. Remove any duplicated Activity state and verify state survives configuration changes.