|
|
@ -40,7 +40,6 @@ object ReadBook { |
|
|
|
|
|
|
|
|
|
|
|
fun resetData(book: Book) { |
|
|
|
fun resetData(book: Book) { |
|
|
|
this.book = book |
|
|
|
this.book = book |
|
|
|
titleDate.postValue(book.name) |
|
|
|
|
|
|
|
durChapterIndex = book.durChapterIndex |
|
|
|
durChapterIndex = book.durChapterIndex |
|
|
|
durPageIndex = book.durChapterPos |
|
|
|
durPageIndex = book.durChapterPos |
|
|
|
isLocalBook = book.origin == BookType.local |
|
|
|
isLocalBook = book.origin == BookType.local |
|
|
@ -48,11 +47,11 @@ object ReadBook { |
|
|
|
prevTextChapter = null |
|
|
|
prevTextChapter = null |
|
|
|
curTextChapter = null |
|
|
|
curTextChapter = null |
|
|
|
nextTextChapter = null |
|
|
|
nextTextChapter = null |
|
|
|
|
|
|
|
titleDate.postValue(book.name) |
|
|
|
upWebBook(book) |
|
|
|
upWebBook(book) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun upWebBook(book: Book?) { |
|
|
|
fun upWebBook(book: Book) { |
|
|
|
book ?: return |
|
|
|
|
|
|
|
webBook = if (book.origin == BookType.local) { |
|
|
|
webBook = if (book.origin == BookType.local) { |
|
|
|
null |
|
|
|
null |
|
|
|
} else { |
|
|
|
} else { |
|
|
|