diff --git a/app/src/main/assets/defaultData/rssSources.json b/app/src/main/assets/defaultData/rssSources.json index b4b2a70e0..bc1754b59 100644 --- a/app/src/main/assets/defaultData/rssSources.json +++ b/app/src/main/assets/defaultData/rssSources.json @@ -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" } ] \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt b/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt index 039c54f75..6441cea91 100644 --- a/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt @@ -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(R.layout.fragment_rss), override fun openRss(rssSource: RssSource) { if (rssSource.singleUrl) { - startActivity { - putExtra("title", rssSource.sourceName) - putExtra("origin", rssSource.sourceUrl) + if (rssSource.sourceUrl.startsWith("http", true)) { + startActivity { + putExtra("title", rssSource.sourceName) + putExtra("origin", rssSource.sourceUrl) + } + } else { + context?.openUrl(rssSource.sourceUrl) } } else { startActivity {