diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 4f6d3f8bf..d886f55e5 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -12,6 +12,11 @@ * 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源! * 关于最近版本有时候界面没有数据的问题是因为把LiveData组件换成了谷歌推荐的Flow组件导致的问题,正在查找解决办法 +**2021/09/29** + +1. 修复阅读界面导航栏挡住内容的bug +2. 修复webView=ture是自动跳转移动网站的bug + **2021/09/28** 1. 添加横屏双页模式 diff --git a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt index 15f94e8bb..533d62a6a 100644 --- a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt +++ b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt @@ -92,17 +92,4 @@ fun getProxyClient(proxy: String? = null): OkHttpClient { return proxyClient } return okHttpClient -} - -suspend fun getWebViewSrc( - url: String? = null, - html: String? = null, - encode: String? = null, - tag: String? = null, - headerMap: Map? = null, - sourceRegex: String? = null, - javaScript: String? = null, -): StrResponse { - return BackstageWebView(url, html, encode, tag, headerMap, sourceRegex, javaScript) - .getStrResponse() } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt index 0387f89db..6f13b1c8e 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt @@ -346,14 +346,16 @@ class AnalyzeUrl( html = body, tag = source?.getKey(), javaScript = webJs ?: jsStr, - sourceRegex = sourceRegex + sourceRegex = sourceRegex, + headerMap = headerMap ).getStrResponse() } else -> BackstageWebView( url = url, tag = source?.getKey(), javaScript = webJs ?: jsStr, - sourceRegex = sourceRegex + sourceRegex = sourceRegex, + headerMap = headerMap ).getStrResponse() } } diff --git a/app/src/main/java/io/legado/app/utils/ActivityExtensions.kt b/app/src/main/java/io/legado/app/utils/ActivityExtensions.kt index a1d9e02a4..2fe4b5425 100644 --- a/app/src/main/java/io/legado/app/utils/ActivityExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/ActivityExtensions.kt @@ -32,19 +32,13 @@ val Activity.windowSize: DisplayMetrics */ val Activity.isNavigationBarExist: Boolean get() { - val viewGroup = window.decorView as? ViewGroup - if (viewGroup != null) { - for (i in 0 until viewGroup.childCount) { - viewGroup.getChildAt(i).context.packageName - if (viewGroup.getChildAt(i).id != View.NO_ID - && "navigationBarBackground" == resources.getResourceEntryName( - viewGroup.getChildAt( - i - ).id - ) - ) { - return true - } + val viewGroup = (window.decorView as? ViewGroup) ?: return false + for (i in 0 until viewGroup.childCount) { + val childId = viewGroup.getChildAt(i).id + if (childId != View.NO_ID + && resources.getResourceEntryName(childId) == "navigationBarBackground" + ) { + return true } } return false