mirror of
https://github.com/mihonapp/mihon.git
synced 2025-07-01 05:27:50 +02:00
Fix webview height issue
Collapsing toolbar doesn't work currently.
This commit is contained in:
@ -98,6 +98,11 @@ class WebViewActivity : BaseActivity<WebviewActivityBinding>() {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
|
||||
super.onPageStarted(view, url, favicon)
|
||||
invalidateOptionsMenu()
|
||||
}
|
||||
|
||||
override fun onPageFinished(view: WebView?, url: String?) {
|
||||
super.onPageFinished(view, url)
|
||||
invalidateOptionsMenu()
|
||||
@ -105,18 +110,9 @@ class WebViewActivity : BaseActivity<WebviewActivityBinding>() {
|
||||
supportActionBar?.subtitle = url
|
||||
binding.swipeRefresh.isEnabled = true
|
||||
binding.swipeRefresh.isRefreshing = false
|
||||
}
|
||||
|
||||
override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
|
||||
super.onPageStarted(view, url, favicon)
|
||||
invalidateOptionsMenu()
|
||||
}
|
||||
|
||||
override fun onPageCommitVisible(view: WebView, url: String) {
|
||||
super.onPageCommitVisible(view, url)
|
||||
|
||||
// Reset to top when page refreshes
|
||||
binding.nestedView.scrollTo(0, 0)
|
||||
view?.scrollTo(0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user