mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-08-20 04:27:29 +00:00
fix(android): LCEOnline auth
This commit is contained in:
parent
ca2fe8e258
commit
f8f67b5a75
|
|
@ -46,6 +46,15 @@ class LceAuthActivity : AppCompatActivity() {
|
|||
request: WebResourceRequest
|
||||
): Boolean = handleAuthUrl(request.url.toString())
|
||||
|
||||
override fun onPageStarted(view: WebView, url: String, favicon: Bitmap?) {
|
||||
handleAuthUrl(url)
|
||||
}
|
||||
|
||||
override fun onPageFinished(view: WebView, url: String) {
|
||||
progressBar.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
webChromeClient = object : android.webkit.WebChromeClient() {
|
||||
override fun onCreateWindow(
|
||||
view: WebView,
|
||||
isDialog: Boolean,
|
||||
|
|
@ -57,14 +66,6 @@ class LceAuthActivity : AppCompatActivity() {
|
|||
resultMsg.sendToTarget()
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onPageStarted(view: WebView, url: String, favicon: Bitmap?) {
|
||||
handleAuthUrl(url)
|
||||
}
|
||||
|
||||
override fun onPageFinished(view: WebView, url: String) {
|
||||
progressBar.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +111,7 @@ class LceAuthActivity : AppCompatActivity() {
|
|||
if (webView.canGoBack()) {
|
||||
webView.goBack()
|
||||
} else {
|
||||
setResult(Activity.RESULT_CANCELED)
|
||||
setResult(RESULT_CANCELED)
|
||||
super.onBackPressed()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue