mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-19 00:33:56 +00:00
wrong download offset fix
This commit is contained in:
@@ -21,7 +21,7 @@ android {
|
||||
minSdk 23
|
||||
targetSdk 34
|
||||
versionCode ((System.currentTimeMillis() / 60000).toInteger())
|
||||
versionName "2.0.0-beta00-i"
|
||||
versionName "2.0.0-beta00-iv2"
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
|
||||
val selected = media.userProgress
|
||||
val chapters = media.manga?.chapters?.values?.toList()
|
||||
//filter by selected language
|
||||
val progressChapterIndex = chapters?.indexOfFirst { MangaNameAdapter.findChapterNumber(it.number)?.toInt() == selected } ?: 0
|
||||
val progressChapterIndex = (chapters?.indexOfFirst { MangaNameAdapter.findChapterNumber(it.number)?.toInt() == selected } ?: 0) + 1
|
||||
|
||||
if (progressChapterIndex < 0 || n < 1 || chapters == null) return
|
||||
|
||||
@@ -209,7 +209,8 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
|
||||
val endIndex = minOf(progressChapterIndex + n, chapters.size)
|
||||
|
||||
//make sure there are enough chapters
|
||||
val chaptersToDownload = chapters.subList(progressChapterIndex + 1, endIndex)
|
||||
val chaptersToDownload = chapters.subList(progressChapterIndex, endIndex)
|
||||
|
||||
|
||||
for (chapter in chaptersToDownload) {
|
||||
onMangaChapterDownloadClick(chapter.title!!)
|
||||
|
||||
Reference in New Issue
Block a user