diff --git a/app/src/main/java/io/legado/app/data/entities/Book.kt b/app/src/main/java/io/legado/app/data/entities/Book.kt index 2274a973c..e02d8ff06 100644 --- a/app/src/main/java/io/legado/app/data/entities/Book.kt +++ b/app/src/main/java/io/legado/app/data/entities/Book.kt @@ -19,7 +19,7 @@ import kotlin.math.max data class Book( @PrimaryKey var bookUrl: String = "", // 详情页Url(本地书源存储完整文件路径) - var tocUrl: String = "", // 目录页Url (toc=table of Contents) + var tocUrl: String? = null, // 目录页Url (toc=table of Contents) var origin: String = BookType.local, // 书源URL(默认BookType.local) var originName: String = "", //书源名称 var name: String? = null, // 书籍名称(书源获取) diff --git a/app/src/main/java/io/legado/app/data/entities/SearchBook.kt b/app/src/main/java/io/legado/app/data/entities/SearchBook.kt index ea8e1aa84..fea706639 100644 --- a/app/src/main/java/io/legado/app/data/entities/SearchBook.kt +++ b/app/src/main/java/io/legado/app/data/entities/SearchBook.kt @@ -26,6 +26,7 @@ data class SearchBook( var intro: String? = null, var wordCount: String? = null, var latestChapterTitle: String? = null, + var tocUrl: String? = null, // 目录页Url (toc=table of Contents) var time: Long = 0L, var variable: String? = null, var bookInfoHtml: String? = null, @@ -80,7 +81,7 @@ data class SearchBook( book.latestChapterTitle = latestChapterTitle book.coverUrl = coverUrl book.intro = intro - + book.tocUrl = tocUrl return book } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt b/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt index 199f5f1a4..c44140716 100644 --- a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt @@ -27,4 +27,8 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) { } } + fun loadBookInfo() { + + } + } \ No newline at end of file