diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
index d21ecfa05..dfad88975 100644
--- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
+++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
@@ -230,7 +230,7 @@ class BookInfoActivity :
binding.tvToc.text = getString(R.string.toc_s, getString(R.string.loading))
}
chapterList.isNullOrEmpty() -> {
- binding.tvToc.text = getString(R.string.toc_s, getString(R.string.error_load_toc))
+ binding.tvToc.text = if (viewModel.isImportBookOnLine) getString(R.string.click_read_button_load) else getString(R.string.toc_s, getString(R.string.error_load_toc))
}
else -> {
viewModel.bookData.value?.let {
diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt
index 45a6f92b1..7a029f588 100644
--- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt
+++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt
@@ -78,7 +78,9 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
isImportBookOnLine = (bookSource?.bookSourceType ?: BookType.local) == BookType.file
if (book.tocUrl.isEmpty()) {
loadBookInfo(book)
- } else if (!isImportBookOnLine) {
+ } else if (isImportBookOnLine) {
+ chapterListData.postValue(emptyList())
+ } else {
val chapterList = appDb.bookChapterDao.getChapterList(book.bookUrl)
if (chapterList.isNotEmpty()) {
chapterListData.postValue(chapterList)
@@ -111,7 +113,7 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
execute(scope) {
if (book.isLocalBook()) {
loadChapter(book, scope)
- } else if (!isImportBookOnLine) {
+ } else {
bookSource?.let { bookSource ->
WebBook.getBookInfo(this, bookSource, book, canReName = canReName)
.onSuccess(IO) {
@@ -144,6 +146,8 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
appDb.bookChapterDao.insert(*it.toTypedArray())
chapterListData.postValue(it)
}
+ } else if (isImportBookOnLine) {
+ chapterListData.postValue(emptyList())
} else {
bookSource?.let { bookSource ->
WebBook.getChapterList(this, bookSource, book)
diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml
index a3a5e4521..7e6011d0b 100644
--- a/app/src/main/res/values-es-rES/strings.xml
+++ b/app/src/main/res/values-es-rES/strings.xml
@@ -979,5 +979,6 @@
导入主题
导入txt目录规则
CookieJar
+ 点击阅读加载目录
diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml
index e98d5fa0b..06cff97fc 100644
--- a/app/src/main/res/values-ja-rJP/strings.xml
+++ b/app/src/main/res/values-ja-rJP/strings.xml
@@ -982,5 +982,6 @@
导入主题
导入txt目录规则
CookieJar
+ 点击阅读加载目录
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 7646b005e..09cc15699 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -982,5 +982,6 @@
导入主题
导入txt目录规则
CookieJar
+ 点击阅读加载目录
diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml
index 90eb8bc6d..eb359a20f 100644
--- a/app/src/main/res/values-zh-rHK/strings.xml
+++ b/app/src/main/res/values-zh-rHK/strings.xml
@@ -979,5 +979,6 @@
导入主题
导入txt目录规则
CookieJar
+ 点击阅读加载目录
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 0de83ac2f..8ae5eaca7 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -981,5 +981,6 @@
导入主题
导入txt目录规则
CookieJar
+ 点击阅读加载目录
diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml
index 19069a3f2..a9a530cc1 100644
--- a/app/src/main/res/values-zh/strings.xml
+++ b/app/src/main/res/values-zh/strings.xml
@@ -981,5 +981,6 @@
导入主题
导入txt目录规则
CookieJar
+ 点击阅读加载目录
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 582890f12..3243f3d87 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -982,5 +982,6 @@
导入主题
导入txt目录规则
CookieJar
+ 点击阅读加载目录