Skip to content

Commit

Permalink
Remove dapp scroll event
Browse files Browse the repository at this point in the history
  • Loading branch information
soaryong-c committed Jul 3, 2023
1 parent bc33a06 commit f51c1ae
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ class WalletConnectActivity : BaseActivity() {
webChromeClient = dappWebChromeClient
webViewClient = dappWebViewClient
setOnTouchListener(webViewTouchListener)
setOnScrollChangeListener(webViewScrollChangeListener)
}
}
setSupportActionBar(binding.toolBar)
Expand Down Expand Up @@ -1366,22 +1365,6 @@ class WalletConnectActivity : BaseActivity() {
false
}

private val webViewScrollChangeListener = View.OnScrollChangeListener { _: View?, _: Int, scrollY: Int, _: Int, oldScrollY: Int ->
if (lastClickPositionY == -1) {
lastClickPositionY = oldScrollY
}
if (lastClickPositionY > scrollY && Math.abs(scrollY - oldScrollY) > 50 && isHideToolbar) {
isHideToolbar = false
supportActionBar?.show()
} else if (lastClickPositionY < scrollY && Math.abs(
scrollY - oldScrollY
) > 50 && !isHideToolbar
) {
isHideToolbar = true
supportActionBar?.hide()
}
}

private val dappWebChromeClient = object : WebChromeClient() {
override fun onJsAlert(
view: WebView, url: String, message: String, result: JsResult
Expand Down

0 comments on commit f51c1ae

Please sign in to comment.