diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt index af9ea3e59e..2bcd8953a2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt @@ -98,6 +98,11 @@ class WebViewActivity : BaseActivity() { 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() { 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) } } diff --git a/app/src/main/res/layout/webview_activity.xml b/app/src/main/res/layout/webview_activity.xml index ff2b723254..ef6cea3c02 100644 --- a/app/src/main/res/layout/webview_activity.xml +++ b/app/src/main/res/layout/webview_activity.xml @@ -1,5 +1,5 @@ - @@ -23,32 +22,23 @@ + android:layout_height="match_parent"> - + android:layout_height="match_parent"> - + android:layout_height="2dp" + android:progressBackgroundTint="@color/colorPrimary" + android:progressTint="@color/colorPrimary" /> - - - - - + - +