From dd49db35793b743efbcd01555b854d43a7a501e5 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 30 Sep 2021 21:14:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96rss=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/rss/read/ReadRssActivity.kt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt index 2b3e9a320..803e2aa03 100644 --- a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt @@ -281,13 +281,6 @@ class ReadRssActivity : VMBaseActivity inner class CustomWebChromeClient : WebChromeClient() { - override fun onReceivedTitle(view: WebView?, title: String?) { - super.onReceivedTitle(view, title) - title.let { - binding.titleBar.title = title - } - } - override fun onShowCustomView(view: View?, callback: CustomViewCallback?) { requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR binding.llView.invisible() @@ -324,7 +317,11 @@ class ReadRssActivity : VMBaseActivity override fun onPageFinished(view: WebView?, url: String?) { super.onPageFinished(view, url) view?.title?.let { title -> - binding.titleBar.title = title + if (title != url && title != view.url && title.isNotBlank()) { + binding.titleBar.title = title + } else { + binding.titleBar.title = intent.getStringExtra("title") + } } }