Add button for toggling watch status

This commit is contained in:
Arkadiusz Fal
2022-12-15 23:51:49 +01:00
parent afe7d72352
commit 4a7d6ace24
5 changed files with 45 additions and 45 deletions

View File

@@ -102,8 +102,14 @@ extension PlayerModel {
}
func removeWatch(_ watch: Watch) {
context.delete(watch)
try? context.save()
context.perform { [weak self] in
guard let self else { return }
self.context.delete(watch)
try? self.context.save()
FeedModel.shared.calculateUnwatchedFeed()
}
}
func removeAllWatches() {