mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
[skip ci] fix not needed type cast
This commit is contained in:
parent
d3d65b0416
commit
1094e13367
@ -197,7 +197,7 @@ class AnalyzeRule(
|
|||||||
}
|
}
|
||||||
if (sourceRule.replaceRegex.isNotEmpty() && result is List<*>) {
|
if (sourceRule.replaceRegex.isNotEmpty() && result is List<*>) {
|
||||||
val newList = ArrayList<String>()
|
val newList = ArrayList<String>()
|
||||||
for (item in result as List<*>) {
|
for (item in result) {
|
||||||
newList.add(replaceRegex(item.toString(), sourceRule))
|
newList.add(replaceRegex(item.toString(), sourceRule))
|
||||||
}
|
}
|
||||||
result = newList
|
result = newList
|
||||||
@ -210,12 +210,12 @@ class AnalyzeRule(
|
|||||||
}
|
}
|
||||||
if (result == null) return null
|
if (result == null) return null
|
||||||
if (result is String) {
|
if (result is String) {
|
||||||
result = (result as String).split("\n")
|
result = result.split("\n")
|
||||||
}
|
}
|
||||||
if (isUrl) {
|
if (isUrl) {
|
||||||
val urlList = ArrayList<String>()
|
val urlList = ArrayList<String>()
|
||||||
if (result is List<*>) {
|
if (result is List<*>) {
|
||||||
for (url in result as List<*>) {
|
for (url in result) {
|
||||||
val absoluteURL = NetworkUtils.getAbsoluteURL(redirectUrl, url.toString())
|
val absoluteURL = NetworkUtils.getAbsoluteURL(redirectUrl, url.toString())
|
||||||
if (absoluteURL.isNotEmpty() && !urlList.contains(absoluteURL)) {
|
if (absoluteURL.isNotEmpty() && !urlList.contains(absoluteURL)) {
|
||||||
urlList.add(absoluteURL)
|
urlList.add(absoluteURL)
|
||||||
|
Loading…
Reference in New Issue
Block a user