🐛 Delete is now possible

This commit is contained in:
2024-07-02 18:33:37 +02:00
parent af2af3d07a
commit 6a53982a82

View File

@@ -79,8 +79,10 @@ struct HomeView: View {
}
func deleteSubscription(at offsets: IndexSet) {
// ToDo: Add delete
// subs.remove(atOffsets: offsets)
for index in offsets {
let itemToDelete = subs[index]
modelContext.delete(itemToDelete)
}
}
func getMonthlyTotal(subs: [Subscription]) -> Float {