Update the android ui to work with the new desktop ui components.

This commit is contained in:
Donovan Preston 2018-11-14 14:20:32 -05:00
parent 1d09a2e694
commit 3dc0ca933b
6 changed files with 230 additions and 296 deletions

View file

@ -149,7 +149,7 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
mToCall = "finishLogin(${toPass})"
this@MainActivity.runOnUiThread({
// But then we also reload this here because we need to make sure onPageFinished runs after mToCall has been set.
// We can't guarantee that onPageFinished has already been called at this point.
// We can't guarantee that onPageFinished wasn't already called at this point.
mWebView!!.loadUrl("file:///android_asset/android.html")
})
@ -181,11 +181,9 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
if (mToCall != null) {
this@MainActivity.runOnUiThread({
mWebView?.evaluateJavascript(mToCall, fun (value: String) {
// noop
mToCall = null
})
})
mToCall = null
}
}