From ff8c9983a4f67f42c3a7c060373fff1fb3716671 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 3 Sep 2019 10:59:59 +0800 Subject: [PATCH] up --- .../io/legado/app/model/webbook/BookChapterList.kt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt b/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt index 81b09ef96..bcd2e8b83 100644 --- a/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt +++ b/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt @@ -26,12 +26,7 @@ object BookChapterList { var chapterList = arrayListOf() val baseUrl: String = NetworkUtils.getUrl(response) val body: String? = response.body() - body ?: throw Exception( - App.INSTANCE.getString( - R.string.error_get_web_content, - baseUrl - ) - ) + body ?: throw Exception(App.INSTANCE.getString(R.string.error_get_web_content, baseUrl)) SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取成功:$baseUrl") val tocRule = bookSource.getTocRule() val nextUrlList = arrayListOf(baseUrl) @@ -67,8 +62,9 @@ object BookChapterList { book, bookSource ) - nextUrl = - if (chapterData.nextUrl.isNotEmpty()) chapterData.nextUrl[0] else "" + nextUrl = if (chapterData.nextUrl.isNotEmpty()) + chapterData.nextUrl[0] + else "" chapterData.chapterList?.let { chapterList.addAll(it) }