mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +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(",")
|
||||
if (!blacklist.isNullOrEmpty()) {
|
||||
blacklist.forEach {
|
||||
if (url.matches(it.toRegex())) {
|
||||
if (url.startsWith(it) || url.matches(it.toRegex())) {
|
||||
return createEmptyResource()
|
||||
}
|
||||
}
|
||||
@ -350,7 +350,7 @@ class ReadRssActivity : VMBaseActivity<ActivityRssReadBinding, ReadRssViewModel>
|
||||
val whitelist = source.contentWhitelist?.splitNotBlank(",")
|
||||
if (!whitelist.isNullOrEmpty()) {
|
||||
whitelist.forEach {
|
||||
if (url.matches(it.toRegex())) {
|
||||
if (url.startsWith(it) || url.matches(it.toRegex())) {
|
||||
return super.shouldInterceptRequest(view, request)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user