diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt
index 75b026ab7..146cb90d7 100644
--- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt
+++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt
@@ -190,18 +190,16 @@ class AnalyzeRule(var book: BaseBook? = null) {
putRule(sourceRule.putMap)
sourceRule.makeUpRule(result)
result?.let {
- if (sourceRule.rule.isNotBlank()) {
- result = when (sourceRule.mode) {
- Mode.Js -> evalJS(sourceRule.rule, it)
- Mode.Json -> getAnalyzeByJSonPath(it).getString(sourceRule.rule)
- Mode.XPath -> getAnalyzeByXPath(it).getString(sourceRule.rule)
- Mode.Default -> if (isUrl) {
- getAnalyzeByJSoup(it).getString0(sourceRule.rule)
- } else {
- getAnalyzeByJSoup(it).getString(sourceRule.rule)
- }
- else -> sourceRule.rule
+ result = when (sourceRule.mode) {
+ Mode.Js -> evalJS(sourceRule.rule, it)
+ Mode.Json -> getAnalyzeByJSonPath(it).getString(sourceRule.rule)
+ Mode.XPath -> getAnalyzeByXPath(it).getString(sourceRule.rule)
+ Mode.Default -> if (isUrl) {
+ getAnalyzeByJSoup(it).getString0(sourceRule.rule)
+ } else {
+ getAnalyzeByJSoup(it).getString(sourceRule.rule)
}
+ else -> sourceRule.rule
}
if (sourceRule.replaceRegex.isNotEmpty()) {
result = replaceRegex(result.toString(), sourceRule)
diff --git a/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt b/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt
index 229a1266e..37cfd690c 100644
--- a/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt
+++ b/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt
@@ -169,7 +169,7 @@ object BookChapterList {
isVip = analyzeRule.getString(vipRule)
if (bookChapter.url.isEmpty()) bookChapter.url = baseUrl
if (bookChapter.title.isNotEmpty()) {
- if (isVip.isNotEmpty()) {
+ if (isVip.isNotEmpty() && isVip != "null" && isVip != "false" && isVip != "0") {
bookChapter.title = "\uD83D\uDD12" + bookChapter.title
}
chapterList.add(bookChapter)
diff --git a/app/src/main/java/io/legado/app/ui/widget/anima/RotateLoading.kt b/app/src/main/java/io/legado/app/ui/widget/anima/RotateLoading.kt
index 7cdb12734..7a5e436c3 100644
--- a/app/src/main/java/io/legado/app/ui/widget/anima/RotateLoading.kt
+++ b/app/src/main/java/io/legado/app/ui/widget/anima/RotateLoading.kt
@@ -10,6 +10,7 @@ import android.graphics.RectF
import android.util.AttributeSet
import android.view.View
import io.legado.app.R
+import io.legado.app.lib.theme.accentColor
import io.legado.app.utils.dp
/**
@@ -66,14 +67,15 @@ class RotateLoading : View {
}
private fun initView(context: Context, attrs: AttributeSet?) {
- loadingColor = Color.WHITE
+ loadingColor = context.accentColor
thisWidth = DEFAULT_WIDTH.dp
shadowPosition = DEFAULT_SHADOW_POSITION.dp
speedOfDegree = DEFAULT_SPEED_OF_DEGREE
if (null != attrs) {
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.RotateLoading)
- loadingColor = typedArray.getColor(R.styleable.RotateLoading_loading_color, Color.WHITE)
+ loadingColor =
+ typedArray.getColor(R.styleable.RotateLoading_loading_color, loadingColor)
thisWidth = typedArray.getDimensionPixelSize(
R.styleable.RotateLoading_loading_width,
DEFAULT_WIDTH.dp
diff --git a/app/src/main/res/layout/view_tab_layout.xml b/app/src/main/res/layout/view_tab_layout.xml
index 80cfe13e4..b44dbd7c7 100644
--- a/app/src/main/res/layout/view_tab_layout.xml
+++ b/app/src/main/res/layout/view_tab_layout.xml
@@ -1,7 +1,9 @@
-
\ No newline at end of file
+
\ No newline at end of file