Merge pull request #195 from TouchInstinct/rename/base_web_view-action_callback

rename webView callback
This commit is contained in:
sousnein 2021-06-11 12:05:54 +03:00 committed by GitHub
commit 48c5b5909a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ open class BaseWebView @JvmOverloads constructor(
/** /**
* If you need to do some action on url click inside WebView, just assign this parameter and disable isRedirectEnable * If you need to do some action on url click inside WebView, just assign this parameter and disable isRedirectEnable
**/ **/
var openBrowserOnRedirectInsideWebView: ((String?, WebView) -> Unit)? = null var actionOnRedirect: ((String?, WebView) -> Unit)? = null
init { init {
binding.pullToRefresh.isEnabled = isPullToRefreshEnable binding.pullToRefresh.isEnabled = isPullToRefreshEnable
@ -111,7 +111,7 @@ open class BaseWebView @JvmOverloads constructor(
} }
override fun actionOnRedirectInsideWebView(webView: WebView, url: String?) { override fun actionOnRedirectInsideWebView(webView: WebView, url: String?) {
openBrowserOnRedirectInsideWebView?.invoke(url, webView) actionOnRedirect?.invoke(url, webView)
} }
fun setBaseWebViewClient(isSSlPinningEnable: Boolean = false) { fun setBaseWebViewClient(isSSlPinningEnable: Boolean = false) {