mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
pass annotation to create highlight call
This commit is contained in:
parent
f3809d88a7
commit
7f8c794dfc
2 changed files with 5 additions and 2 deletions
|
|
@ -56,7 +56,9 @@ struct WebReader: UIViewRepresentable {
|
|||
|
||||
webView.configuration.userContentController.add(webView, name: "viewerAction")
|
||||
|
||||
webView.configuration.userContentController.addScriptMessageHandler(context.coordinator, contentWorld: .page, name: "articleAction")
|
||||
webView.configuration.userContentController.addScriptMessageHandler(
|
||||
context.coordinator, contentWorld: .page, name: "articleAction"
|
||||
)
|
||||
|
||||
context.coordinator.linkHandler = openLinkAction
|
||||
context.coordinator.webViewActionHandler = webViewActionHandler
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ final class WebReaderViewModel: ObservableObject {
|
|||
highlightID: messageBody["id"] as? String ?? "",
|
||||
quote: messageBody["quote"] as? String ?? "",
|
||||
patch: messageBody["patch"] as? String ?? "",
|
||||
articleId: messageBody["articleId"] as? String ?? ""
|
||||
articleId: messageBody["articleId"] as? String ?? "",
|
||||
annotation: messageBody["annotation"] as? String ?? ""
|
||||
)
|
||||
.sink { completion in
|
||||
guard case .failure = completion else { return }
|
||||
|
|
|
|||
Loading…
Reference in a new issue