This commit is contained in:
Horis 2024-01-31 23:53:48 +08:00
parent f81848244c
commit cbad59f6fc

View File

@ -273,12 +273,7 @@ open class ChangeBookSourceViewModel(application: Application) : BaseViewModel(a
) = coroutineScope {
val chapterIndex = if (fromReadBookActivity) {
oldBook?.let {
BookHelp.getDurChapter(
it.durChapterIndex,
it.durChapterTitle,
chapters,
it.totalChapterNum
)
BookHelp.getDurChapter(it, chapters)
} ?: chapters.lastIndex
} else chapters.lastIndex
val bookChapter = chapters[chapterIndex]