Add clear history button to home

This commit is contained in:
Arkadiusz Fal
2022-11-15 12:22:27 +01:00
parent 8727fb1e30
commit 78ff495927
5 changed files with 43 additions and 16 deletions

View File

@@ -94,6 +94,11 @@ extension PlayerModel {
}
}
func removeHistory() {
removeAllWatches()
CacheModel.shared.removeAll()
}
func removeWatch(_ watch: Watch) {
context.delete(watch)
try? context.save()