mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #1185 from omnivore-app/fix/add-lookup-menu-to-pdf
Add the Lookup (define) menu item to PDF
This commit is contained in:
commit
1fafcd84bc
1 changed files with 3 additions and 1 deletions
|
|
@ -88,6 +88,7 @@ import Utils
|
|||
}
|
||||
.onShouldShowMenuItemsForSelectedText(perform: { pageView, menuItems, selectedText in
|
||||
let copy = menuItems.first(where: { $0.identifier == "Copy" })
|
||||
let define = menuItems.first(where: { $0.identifier == "Define" })
|
||||
let highlight = MenuItem(title: "Highlight", block: {
|
||||
_ = coordinator.highlightSelection(
|
||||
pageView: pageView,
|
||||
|
|
@ -101,7 +102,8 @@ import Utils
|
|||
// shareLink = ShareLink(id: UUID(), url: shareURL)
|
||||
// }
|
||||
// })
|
||||
return [copy, highlight /* , share */ ].compactMap { $0 }
|
||||
define?.title = "Lookup"
|
||||
return [copy, highlight, define].compactMap { $0 }
|
||||
})
|
||||
.onShouldShowMenuItemsForSelectedAnnotations(perform: { _, menuItems, annotations in
|
||||
var result = [MenuItem]()
|
||||
|
|
|
|||
Loading…
Reference in a new issue