pull/885/head^2
gedoor 4 years ago
parent ebc5a9b055
commit 6c8f1609b2
  1. 9
      app/src/main/assets/defaultData/rssSources.json
  2. 11
      app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt

@ -17,5 +17,14 @@
"sourceName": "阅读下载",
"sourceUrl": "https:\/\/github.com\/gedoor\/legado\/releases",
"style": ""
},
{
"customOrder": 1,
"enableJs": true,
"enabled": true,
"singleUrl": true,
"sourceIcon": "http:\/\/mmbiz.qpic.cn\/mmbiz_png\/hpfMV8hEuL2eS6vnCxvTzoOiaCAibV6exBzJWq9xMic9xDg3YXAick87tsfafic0icRwkQ5ibV0bJ84JtSuxhPuEDVquA\/0?wx_fmt=png",
"sourceName": "小说拾遗",
"sourceUrl": "snssdk1128:\/\/user\/profile\/562564899806367"
}
]

@ -25,6 +25,7 @@ import io.legado.app.ui.rss.source.manage.RssSourceActivity
import io.legado.app.ui.rss.source.manage.RssSourceViewModel
import io.legado.app.ui.rss.subscription.RuleSubActivity
import io.legado.app.utils.cnCompare
import io.legado.app.utils.openUrl
import io.legado.app.utils.splitNotBlank
import io.legado.app.utils.startActivity
import io.legado.app.utils.viewbindingdelegate.viewBinding
@ -143,9 +144,13 @@ class RssFragment : VMBaseFragment<RssSourceViewModel>(R.layout.fragment_rss),
override fun openRss(rssSource: RssSource) {
if (rssSource.singleUrl) {
startActivity<ReadRssActivity> {
putExtra("title", rssSource.sourceName)
putExtra("origin", rssSource.sourceUrl)
if (rssSource.sourceUrl.startsWith("http", true)) {
startActivity<ReadRssActivity> {
putExtra("title", rssSource.sourceName)
putExtra("origin", rssSource.sourceUrl)
}
} else {
context?.openUrl(rssSource.sourceUrl)
}
} else {
startActivity<RssSortActivity> {

Loading…
Cancel
Save