mirror of
https://github.com/yattee/yattee.git
synced 2025-01-09 14:27:11 +00:00
Add remove item to search recents items
This commit is contained in:
parent
947f216fac
commit
ca7195caba
@ -333,6 +333,7 @@ struct SearchView: View {
|
|||||||
NavigationLink(destination: recentItemNavigationLinkDestination(item)) {
|
NavigationLink(destination: recentItemNavigationLinkDestination(item)) {
|
||||||
recentItemLabel(item)
|
recentItemLabel(item)
|
||||||
}
|
}
|
||||||
|
.contextMenu { recentItemContextMenu(item) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder private func recentItemNavigationLinkDestination(_ item: RecentItem) -> some View {
|
@ViewBuilder private func recentItemNavigationLinkDestination(_ item: RecentItem) -> some View {
|
||||||
@ -393,7 +394,11 @@ struct SearchView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
recentItemLabel(item)
|
recentItemLabel(item)
|
||||||
}
|
}
|
||||||
.contextMenu {
|
.contextMenu { recentItemContextMenu(item) }
|
||||||
|
}
|
||||||
|
|
||||||
|
private func recentItemContextMenu(_ item: RecentItem) -> some View {
|
||||||
|
Group {
|
||||||
removeButton(item)
|
removeButton(item)
|
||||||
|
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
|
Loading…
Reference in New Issue
Block a user