send highlightID in json payload send to native app
This commit is contained in:
@ -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',
|
||||
|
||||
Reference in New Issue
Block a user