|
|
@ -64,10 +64,17 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
ReadBook.loadContent(resetPageOffset = true) |
|
|
|
ReadBook.loadContent(resetPageOffset = true) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
isInitFinish = true |
|
|
|
if (ReadBook.durChapterIndex != book.durChapterIndex) { |
|
|
|
|
|
|
|
ReadBook.durChapterIndex = book.durChapterIndex |
|
|
|
|
|
|
|
ReadBook.durPageIndex = book.durChapterPos |
|
|
|
|
|
|
|
ReadBook.prevTextChapter = null |
|
|
|
|
|
|
|
ReadBook.curTextChapter = null |
|
|
|
|
|
|
|
ReadBook.nextTextChapter = null |
|
|
|
|
|
|
|
} |
|
|
|
ReadBook.book!!.group = book.group |
|
|
|
ReadBook.book!!.group = book.group |
|
|
|
ReadBook.titleDate.postValue(book.name) |
|
|
|
ReadBook.titleDate.postValue(book.name) |
|
|
|
ReadBook.upWebBook(book) |
|
|
|
ReadBook.upWebBook(book) |
|
|
|
|
|
|
|
isInitFinish = true |
|
|
|
if (!book.isLocalBook() && ReadBook.webBook == null) { |
|
|
|
if (!book.isLocalBook() && ReadBook.webBook == null) { |
|
|
|
autoChangeSource(book.name, book.author) |
|
|
|
autoChangeSource(book.name, book.author) |
|
|
|
return |
|
|
|
return |
|
|
@ -82,6 +89,8 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (ReadBook.curTextChapter != null) { |
|
|
|
if (ReadBook.curTextChapter != null) { |
|
|
|
ReadBook.callBack?.upContent(resetPageOffset = false) |
|
|
|
ReadBook.callBack?.upContent(resetPageOffset = false) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
ReadBook.loadContent(resetPageOffset = true) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|