mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
f81848244c
commit
cbad59f6fc
@ -273,12 +273,7 @@ open class ChangeBookSourceViewModel(application: Application) : BaseViewModel(a
|
|||||||
) = coroutineScope {
|
) = coroutineScope {
|
||||||
val chapterIndex = if (fromReadBookActivity) {
|
val chapterIndex = if (fromReadBookActivity) {
|
||||||
oldBook?.let {
|
oldBook?.let {
|
||||||
BookHelp.getDurChapter(
|
BookHelp.getDurChapter(it, chapters)
|
||||||
it.durChapterIndex,
|
|
||||||
it.durChapterTitle,
|
|
||||||
chapters,
|
|
||||||
it.totalChapterNum
|
|
||||||
)
|
|
||||||
} ?: chapters.lastIndex
|
} ?: chapters.lastIndex
|
||||||
} else chapters.lastIndex
|
} else chapters.lastIndex
|
||||||
val bookChapter = chapters[chapterIndex]
|
val bookChapter = chapters[chapterIndex]
|
||||||
|
Loading…
Reference in New Issue
Block a user