Fix delete flashcards

Forgot to save after deleting the object
This commit is contained in:
2024-05-01 12:42:52 +02:00
parent df106ed67c
commit bce174b5b1
2 changed files with 5 additions and 1 deletions

View File

@@ -69,7 +69,6 @@ Why settle for pricey apps when you can have WordAX? We're here to prove that ef
- [x] Implement logic - [x] Implement logic
- [ ] Make an apple watch version of the app - [ ] Make an apple watch version of the app
- [ ] Option to add a hint - [ ] Option to add a hint
- [ ] Delete doesn't work
- [ ] Add haptic touch - [ ] Add haptic touch
<p align="right">(<a href="#readme-top">back to top</a>)</p> <p align="right">(<a href="#readme-top">back to top</a>)</p>

View File

@@ -31,6 +31,11 @@ struct FlashCardListView: View {
moc.delete(flashcard) moc.delete(flashcard)
} }
do {
try moc.save()
} catch {
print("Something went wrong while deleting an object")
}
}) })
} }
} else { } else {