Handle results from article actions in swift

This commit is contained in:
Jackson Harper
2022-03-22 15:25:02 -07:00
parent 7f15f42358
commit 7b6c381ce2
4 changed files with 41 additions and 3 deletions

View File

@ -6,11 +6,13 @@ import { applyStoredTheme } from '@omnivore/web/lib/themeUpdater'
import '@omnivore/web/styles/globals.css'
import '@omnivore/web/styles/articleInnerStyling.css'
const mutation = (name, input) => {
window?.webkit?.messageHandlers.viewerAction?.postMessage({
const mutation = async (name, input) => {
const result = await window?.webkit?.messageHandlers.articleAction?.postMessage({
actionID: name,
...input
})
console.log('action result', result, result.result)
return result.result
}
const App = () => {