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

@@ -151,10 +151,7 @@ struct HistorySettings: View {
message: Text(
"This cannot be reverted. You might need to switch between views or restart the app to see changes."
),
primaryButton: .destructive(Text("Clear All")) {
player.removeAllWatches()
CacheModel.shared.removeAll()
},
primaryButton: .destructive(Text("Clear All"), action: player.removeHistory),
secondaryButton: .cancel()
)
)