mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Revert some test iOS changes
This commit is contained in:
parent
707ec53cf6
commit
ba39d8aff6
2 changed files with 9 additions and 13 deletions
|
|
@ -88,7 +88,6 @@ struct WebReaderContent {
|
|||
window.localStorage.setItem("theme", "\(themeKey)")
|
||||
window.prefersHighContrastFont = \(prefersHighContrastText)
|
||||
window.enableHighlightBar = \(isMacApp)
|
||||
window.enableSelectToHighlight = true
|
||||
</script>
|
||||
<script src="bundle.js"></script>
|
||||
<script src="mathJaxConfiguration.js" id="MathJax-script"></script>
|
||||
|
|
|
|||
|
|
@ -196,17 +196,15 @@ public final class OmnivoreWebView: WKWebView {
|
|||
private func setDefaultMenu() {
|
||||
currentMenu = .defaultMenu
|
||||
|
||||
setHighlightMenu()
|
||||
if #available(iOS 16.0, *) {
|
||||
// on iOS16 we use menuBuilder to create these items
|
||||
} else {
|
||||
let annotate = UIMenuItem(title: "Annotate", action: #selector(annotateSelection))
|
||||
let highlight = UIMenuItem(title: LocalText.genericHighlight, action: #selector(highlightSelection))
|
||||
// let share = UIMenuItem(title: "Share", action: #selector(shareSelection))
|
||||
|
||||
// if #available(iOS 16.0, *) {
|
||||
// // on iOS16 we use menuBuilder to create these items
|
||||
// } else {
|
||||
// let annotate = UIMenuItem(title: "Annotate", action: #selector(annotateSelection))
|
||||
// let highlight = UIMenuItem(title: LocalText.genericHighlight, action: #selector(highlightSelection))
|
||||
// // let share = UIMenuItem(title: "Share", action: #selector(shareSelection))
|
||||
//
|
||||
// UIMenuController.shared.menuItems = [highlight, /* share, */ annotate]
|
||||
// }
|
||||
UIMenuController.shared.menuItems = [highlight, /* share, */ annotate]
|
||||
}
|
||||
}
|
||||
|
||||
private func setHighlightMenu() {
|
||||
|
|
@ -232,8 +230,7 @@ public final class OmnivoreWebView: WKWebView {
|
|||
}
|
||||
|
||||
@objc func menuDidHide() {
|
||||
// setDefaultMenu()
|
||||
setHighlightMenu()
|
||||
setDefaultMenu()
|
||||
}
|
||||
|
||||
// swiftlint:disable:next line_length
|
||||
|
|
|
|||
Loading…
Reference in a new issue