Todo repository protocol (#8)
This PR contains the work done to decouple the direct use of the `ModelContext` from `SwiftData` from the view model that uses it. In addition, the project transitioned to use Swift 6 and strict concurrency which brought some issues with the unit tests, so they were amended as well. Reviewed-on: rock-n-code/todos-app#8 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #8.
This commit is contained in:
@@ -45,7 +45,7 @@ struct TaskListView: View {
|
||||
group: viewModel.group,
|
||||
showCompleted: viewModel.showCompleted
|
||||
) { tasks, offsets in
|
||||
viewModel.deleteTasks(
|
||||
viewModel.delete(
|
||||
tasks,
|
||||
at: offsets,
|
||||
from: modelContext
|
||||
|
||||
Reference in New Issue
Block a user