mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
Some checks failed
Test Build / prepare (push) Has been cancelled
Test Build / build (app, release) (push) Has been cancelled
Test Build / build (app, releaseA) (push) Has been cancelled
Test Build / prerelease (push) Has been cancelled
Test Build / lanzou (push) Has been cancelled
Test Build / test_Branch (push) Has been cancelled
Test Build / telegram (push) Has been cancelled
Some checks failed
Test Build / prepare (push) Has been cancelled
Test Build / build (app, release) (push) Has been cancelled
Test Build / build (app, releaseA) (push) Has been cancelled
Test Build / prerelease (push) Has been cancelled
Test Build / lanzou (push) Has been cancelled
Test Build / test_Branch (push) Has been cancelled
Test Build / telegram (push) Has been cancelled
This commit is contained in:
@@ -56,7 +56,6 @@ object ReadBook : CoroutineScope by MainScope() {
|
||||
var book: Book? = null
|
||||
var callBack: CallBack? = null
|
||||
var inBookshelf = false
|
||||
var tocChanged = false
|
||||
var chapterSize = 0
|
||||
var simulatedChapterSize = 0
|
||||
var durChapterIndex = 0
|
||||
@@ -925,9 +924,10 @@ object ReadBook : CoroutineScope by MainScope() {
|
||||
if (simulatedChapterSize > 0 && durChapterIndex > simulatedChapterSize - 1) {
|
||||
durChapterIndex = simulatedChapterSize - 1
|
||||
}
|
||||
clearTextChapter()
|
||||
if (callBack != null) {
|
||||
loadContent(false)
|
||||
if (callBack == null) {
|
||||
clearTextChapter()
|
||||
} else {
|
||||
loadContent(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ import kotlin.math.min
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
object ReadManga : CoroutineScope by MainScope() {
|
||||
var inBookshelf = false
|
||||
var tocChanged = false
|
||||
var book: Book? = null
|
||||
val executor = globalExecutor
|
||||
var durChapterIndex = 0 //章节位置
|
||||
@@ -546,8 +545,9 @@ object ReadManga : CoroutineScope by MainScope() {
|
||||
if (simulatedChapterSize > 0 && durChapterIndex > simulatedChapterSize - 1) {
|
||||
durChapterIndex = simulatedChapterSize - 1
|
||||
}
|
||||
clearMangaChapter()
|
||||
if (mCallback != null) {
|
||||
if (mCallback == null) {
|
||||
clearMangaChapter()
|
||||
} else {
|
||||
loadContent()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,6 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
|
||||
execute {
|
||||
if (loadChapterListAwait(book)) {
|
||||
ReadBook.upMsg(null)
|
||||
ReadBook.loadContent(resetPageOffset = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,6 @@ class TocActivity : VMBaseActivity<ActivityChapterListBinding, TocViewModel>(),
|
||||
ReadBook.book?.let { readBook ->
|
||||
if (readBook == book) {
|
||||
ReadBook.upMsg(null)
|
||||
ReadBook.loadContent(resetPageOffset = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user