mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
send highlightID in json payload send to native app
This commit is contained in:
parent
a0aeb79686
commit
f13c3551fa
2 changed files with 3 additions and 1 deletions
|
|
@ -162,11 +162,12 @@ fun WebReader(
|
|||
}
|
||||
|
||||
val javascriptInterface = AndroidWebKitMessenger { actionID, json ->
|
||||
Log.d("wv", "received actionID from Android: $actionID, $json")
|
||||
when (actionID) {
|
||||
"existingHighlightTap" -> {
|
||||
isExistingHighlightSelected = true
|
||||
actionTapCoordinates = Gson().fromJson(json, ActionTapCoordinates::class.java)
|
||||
Log.d("Loggo", "receive existing highlight tap action: $actionTapCoordinates")
|
||||
Log.d("wv", "receive existing highlight tap action: $actionTapCoordinates")
|
||||
startActionMode(null, ActionMode.TYPE_PRIMARY)
|
||||
}
|
||||
else -> {
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
|||
rectY: rect.y,
|
||||
rectWidth: rect.width,
|
||||
rectHeight: rect.height,
|
||||
highlightID: highlight.id,
|
||||
}
|
||||
window?.webkit?.messageHandlers.viewerAction?.postMessage({
|
||||
actionID: 'showMenu',
|
||||
|
|
|
|||
Loading…
Reference in a new issue