订阅规则下一页规则可以填page

pull/300/head 3.20.080908
gedoor 4 years ago
parent b638c432f5
commit 7a06e8e90a
  1. 2
      app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt
  2. 6
      app/src/main/java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt

@ -45,7 +45,7 @@ object RssParserByRule {
if (!rssSource.ruleNextPage.isNullOrEmpty()) {
Debug.log(sourceUrl, "┌获取下一页链接")
if (rssSource.ruleNextPage!!.toUpperCase(Locale.getDefault()) == "PAGE") {
nextUrl = "PAGE"
nextUrl = sortUrl
} else {
nextUrl = analyzeRule.getString(rssSource.ruleNextPage)
if (nextUrl.isNotEmpty()) {

@ -57,11 +57,7 @@ class RssArticlesViewModel(application: Application) : BaseViewModel(application
fun loadMore(rssSource: RssSource) {
isLoading = true
page++
val pageUrl = if (nextPageUrl == "PAGE") {
sortUrl
} else {
nextPageUrl
}
val pageUrl = nextPageUrl
if (!pageUrl.isNullOrEmpty()) {
Rss.getArticles(sortName, pageUrl, rssSource, page)
.onSuccess(Dispatchers.IO) {

Loading…
Cancel
Save