mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
754bee4a80
commit
35ed9ddd9d
@ -342,7 +342,7 @@ class ReadRssActivity : VMBaseActivity<ActivityRssReadBinding, ReadRssViewModel>
|
|||||||
val blacklist = source.contentBlacklist?.splitNotBlank(",")
|
val blacklist = source.contentBlacklist?.splitNotBlank(",")
|
||||||
if (!blacklist.isNullOrEmpty()) {
|
if (!blacklist.isNullOrEmpty()) {
|
||||||
blacklist.forEach {
|
blacklist.forEach {
|
||||||
if (url.matches(it.toRegex())) {
|
if (url.startsWith(it) || url.matches(it.toRegex())) {
|
||||||
return createEmptyResource()
|
return createEmptyResource()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,7 +350,7 @@ class ReadRssActivity : VMBaseActivity<ActivityRssReadBinding, ReadRssViewModel>
|
|||||||
val whitelist = source.contentWhitelist?.splitNotBlank(",")
|
val whitelist = source.contentWhitelist?.splitNotBlank(",")
|
||||||
if (!whitelist.isNullOrEmpty()) {
|
if (!whitelist.isNullOrEmpty()) {
|
||||||
whitelist.forEach {
|
whitelist.forEach {
|
||||||
if (url.matches(it.toRegex())) {
|
if (url.startsWith(it) || url.matches(it.toRegex())) {
|
||||||
return super.shouldInterceptRequest(view, request)
|
return super.shouldInterceptRequest(view, request)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user