mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Add remove item to search recents items
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user