From 340b509c728156195ea54f124cf6bed7fdfa18f0 Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 11 Sep 2020 10:16:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.md | 2 +- .../java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt | 9 +++++---- app/src/main/res/layout/item_download.xml | 4 ++-- app/src/main/res/values/strings.xml | 1 - 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api.md b/api.md index 269044458..3a10e4507 100644 --- a/api.md +++ b/api.md @@ -4,7 +4,7 @@ ## 使用 ### Web 以下说明假设您的操作在本机进行,且开放端口为1234。 -如果您要从远程计算机访问[阅读],请将`127.0.0.1`替换成手机IP。 +如果您要从远程计算机访问[阅读](),请将`127.0.0.1`替换成手机IP。 #### 插入单个书源 ``` URL = http://127.0.0.1:1234/saveSource 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 26069af22..396df397e 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 @@ -192,10 +192,11 @@ class AnalyzeUrl( option?.let { _ -> option.method?.let { if (it.equals("POST", true)) method = RequestMethod.POST } option.headers?.let { headers -> - (headers as? Map<*, *>)?.forEach { key, value -> - headerMap[key.toString()] = value.toString() - } - if (headers is String) { + if (headers is Map<*, *>) { + headers.forEach { entry -> + headerMap[entry.key.toString()] = entry.value.toString() + } + } else if (headers is String) { GSON.fromJsonObject>(headers) ?.let { headerMap.putAll(it) } } diff --git a/app/src/main/res/layout/item_download.xml b/app/src/main/res/layout/item_download.xml index 6d06afb86..a82f4f767 100644 --- a/app/src/main/res/layout/item_download.xml +++ b/app/src/main/res/layout/item_download.xml @@ -38,12 +38,12 @@ android:layout_height="36dp" android:padding="6dp" android:background="?attr/selectableItemBackgroundBorderless" - android:tint="@color/primaryText" android:src="@drawable/ic_play_24dp" android:contentDescription="@string/start" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintRight_toLeftOf="@+id/tv_export" /> + app:layout_constraintRight_toLeftOf="@+id/tv_export" + app:tint="@color/primaryText" /> Padding right Check book sources Check the selected source - Debug the selected source Progress %1$d/%2$d Please install and select Chinese TTS! TTS initialization failed!