Add remove item to search recents items

This commit is contained in:
Arkadiusz Fal 2023-05-26 23:21:07 +02:00
parent 947f216fac
commit ca7195caba

View File

@ -333,6 +333,7 @@ struct SearchView: View {
NavigationLink(destination: recentItemNavigationLinkDestination(item)) {
recentItemLabel(item)
}
.contextMenu { recentItemContextMenu(item) }
}
@ViewBuilder private func recentItemNavigationLinkDestination(_ item: RecentItem) -> some View {
@ -393,7 +394,11 @@ struct SearchView: View {
} label: {
recentItemLabel(item)
}
.contextMenu {
.contextMenu { recentItemContextMenu(item) }
}
private func recentItemContextMenu(_ item: RecentItem) -> some View {
Group {
removeButton(item)
#if os(tvOS)