From 69f9ee17dce6f19d23bbfa9875d2291b5f0f776a Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 8 Aug 2020 18:18:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E9=98=85=E8=A7=84=E5=88=99=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=A1=B5=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/model/Debug.kt | 2 +- .../java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/Debug.kt b/app/src/main/java/io/legado/app/model/Debug.kt index 58944e05b..e9089bf68 100644 --- a/app/src/main/java/io/legado/app/model/Debug.kt +++ b/app/src/main/java/io/legado/app/model/Debug.kt @@ -55,7 +55,7 @@ object Debug { debugSource = rssSource.sourceUrl log(debugSource, "︾开始解析") val sort = rssSource.sortUrls().entries.first() - Rss.getArticles(sort.key, sort.value, rssSource, null) + Rss.getArticles(sort.key, sort.value, rssSource, null, 1) .onSuccess { if (it.articles.isEmpty()) { log(debugSource, "⇒列表页解析成功,为空") diff --git a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt index b2020aea9..19f02511b 100644 --- a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesViewModel.kt @@ -27,10 +27,10 @@ class RssArticlesViewModel(application: Application) : BaseViewModel(application } } - fun loadContent(rssSource: RssSource) { isLoading = true - Rss.getArticles(sortName, sortUrl, rssSource, null, 1) + page = 1 + Rss.getArticles(sortName, sortUrl, rssSource, null, page) .onSuccess(Dispatchers.IO) { nextPageUrl = it.nextPageUrl it.articles.let { list ->