summaryrefslogtreecommitdiff
path: root/Sora/Views
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-23 11:55:43 -0800
committerFuwn <[email protected]>2026-02-23 13:33:43 -0800
commit873976418f09f512a66af11161c4ceeefb78fbce (patch)
tree38bb0e4a42613061f356fb8ab8747ebe1f1669db /Sora/Views
parentfeat: add accessibility metadata to interactive image view (diff)
downloadsora-testing-873976418f09f512a66af11161c4ceeefb78fbce.tar.xz
sora-testing-873976418f09f512a66af11161c4ceeefb78fbce.zip
feat: mark context menu delete actions as destructive
Diffstat (limited to 'Sora/Views')
-rw-r--r--Sora/Views/FavoritesView.swift9
-rw-r--r--Sora/Views/Generic/GenericListView.swift9
2 files changed, 12 insertions, 6 deletions
diff --git a/Sora/Views/FavoritesView.swift b/Sora/Views/FavoritesView.swift
index 1217441..1ca41d0 100644
--- a/Sora/Views/FavoritesView.swift
+++ b/Sora/Views/FavoritesView.swift
@@ -636,9 +636,12 @@ struct FavoritesView: View { // swiftlint:disable:this type_body_length
}
}
- Button {
- settings.removeFavorite(withID: favorite.id)
- } label: {
+ Button(
+ role: .destructive,
+ action: {
+ settings.removeFavorite(withID: favorite.id)
+ }
+ ) {
Label("Delete", systemImage: "trash")
}
}
diff --git a/Sora/Views/Generic/GenericListView.swift b/Sora/Views/Generic/GenericListView.swift
index ac65da3..476bbc1 100644
--- a/Sora/Views/Generic/GenericListView.swift
+++ b/Sora/Views/Generic/GenericListView.swift
@@ -554,9 +554,12 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View {
}
}
- Button {
- removeActionUUID(item.id)
- } label: {
+ Button(
+ role: .destructive,
+ action: {
+ removeActionUUID(item.id)
+ }
+ ) {
Label("Delete", systemImage: "trash")
}
}