From 47bfeddb051bf5026ea972be0c5823eac28c2c02 Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 15 Jan 2020 00:17:40 -0800 Subject: [PATCH] Fixed webview starting in the middle of a new page --- .../eu/kanade/tachiyomi/ui/manga/info/WebViewActivity.kt | 6 +++++- app/src/main/res/layout/webview_activity.xml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/WebViewActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/WebViewActivity.kt index 4d9ed5fc7d..ed81fc4950 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/WebViewActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/WebViewActivity.kt @@ -146,7 +146,11 @@ class WebViewActivity : BaseActivity() { override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) { super.onPageStarted(view, url, favicon) invalidateOptionsMenu() - //swipe_refresh.isEnabled = false + } + + override fun onPageCommitVisible(view: WebView?, url: String?) { + super.onPageCommitVisible(view, url) + nested_view.scrollTo(0,0) } } val marginB = webview.marginBottom diff --git a/app/src/main/res/layout/webview_activity.xml b/app/src/main/res/layout/webview_activity.xml index c38751a9cb..e6bad2560c 100644 --- a/app/src/main/res/layout/webview_activity.xml +++ b/app/src/main/res/layout/webview_activity.xml @@ -32,6 +32,7 @@ android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior">