Skip to content

Commit 405bfad

Browse files
author
Reed Es
committed
various refinements
1 parent 7e7437b commit 405bfad

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Sources/Menus/EditDetailerContextMenu.swift

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public struct EditDetailerContextMenu<Element>: ViewModifier
5252
content
5353
.contextMenu {
5454
DetailerEditButton(element: element, canEdit: config.canEdit) { toEdit = $0 }
55+
56+
// NOTE if no delete handler, hide menu item entirely
5557
if isDeleteAvailable {
5658
Divider()
5759
DetailerDeleteButton(element: element, canDelete: config.canDelete, onDelete: config.onDelete)

Sources/Menus/EditDetailerSwipeMenu.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,10 @@ public struct EditDetailerSwipeMenu<Element>: ViewModifier
5656
.tint(.accentColor)
5757
}
5858
.swipeActions(edge: .trailing, allowsFullSwipe: true) {
59+
// NOTE if no delete handler, hide menu item entirely
5960
if isDeleteAvailable {
6061
DetailerDeleteButton(element: element, canDelete: config.canDelete, onDelete: config.onDelete)
6162
.tint(.red)
62-
} else {
63-
EmptyView()
6463
}
6564
}
6665
}

0 commit comments

Comments
 (0)