From 1df26fd14909d86848c0d61e4fda8eceb2baea60 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 1 Mar 2020 11:20:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/assets/updateLog.md | 1 + .../java/io/legado/app/ui/rss/read/ReadRssActivity.kt | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 27ad880e6..d73409a48 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -8,6 +8,7 @@ * 添加底部操作栏颜色配置 * 修复滚动点击翻页,修复滚动最后一页显示加载中 * 去除备份恢复默认路径 +* 尝试修复部分手机一键导入书源报错 * 翻页还有些bug不用反馈了,我已经知道,会修复的 **2020/02/29** 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 255505178..9ad7a9cf0 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 @@ -78,6 +78,17 @@ class ReadRssActivity : VMBaseActivity(R.layout.activity_rss_r } return true } + + @Suppress("DEPRECATION") + override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean { + if (url?.startsWith("http", true) == true) { + return false + } + url?.let { + openUrl(it) + } + return true + } } webView.settings.apply { mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW