mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
0352409e66
commit
9d477c98a7
@ -96,9 +96,13 @@ class ReadRssActivity : VMBaseActivity<ActivityRssReadBinding, ReadRssViewModel>
|
|||||||
binding.webView.reload()
|
binding.webView.reload()
|
||||||
}
|
}
|
||||||
R.id.menu_rss_star -> viewModel.favorite()
|
R.id.menu_rss_star -> viewModel.favorite()
|
||||||
R.id.menu_share_it -> viewModel.rssArticle?.let {
|
R.id.menu_share_it -> {
|
||||||
share(it.link)
|
binding.webView.url?.let {
|
||||||
} ?: toastOnUi(R.string.null_url)
|
share(it)
|
||||||
|
} ?: viewModel.rssArticle?.let {
|
||||||
|
share(it.link)
|
||||||
|
} ?: toastOnUi(R.string.null_url)
|
||||||
|
}
|
||||||
R.id.menu_aloud -> readAloud()
|
R.id.menu_aloud -> readAloud()
|
||||||
R.id.menu_login -> startActivity<SourceLoginActivity> {
|
R.id.menu_login -> startActivity<SourceLoginActivity> {
|
||||||
putExtra("type", "rssSource")
|
putExtra("type", "rssSource")
|
||||||
@ -338,7 +342,7 @@ class ReadRssActivity : VMBaseActivity<ActivityRssReadBinding, ReadRssViewModel>
|
|||||||
request: WebResourceRequest
|
request: WebResourceRequest
|
||||||
): WebResourceResponse? {
|
): WebResourceResponse? {
|
||||||
val url = request.url.toString()
|
val url = request.url.toString()
|
||||||
viewModel.rssSource?.let {source ->
|
viewModel.rssSource?.let { source ->
|
||||||
val blacklist = source.contentBlacklist?.splitNotBlank(",")
|
val blacklist = source.contentBlacklist?.splitNotBlank(",")
|
||||||
if (!blacklist.isNullOrEmpty()) {
|
if (!blacklist.isNullOrEmpty()) {
|
||||||
blacklist.forEach {
|
blacklist.forEach {
|
||||||
|
Loading…
Reference in New Issue
Block a user