SlimeRead: fix crash (#6088)

* fix crash

* bump version
This commit is contained in:
Cuong-Tran 2024-11-17 20:15:00 +07:00 committed by Draff
parent 07a466617d
commit a3f8524300
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'SlimeRead'
extClass = '.SlimeRead'
extVersionCode = 13
extVersionCode = 14
isNsfw = true
}

View File

@ -110,12 +110,12 @@ class SlimeRead : HttpSource() {
// Handling a large manga list
return Observable.just(popularMangeCache!!)
.map { mangaPage ->
val (mangas) = mangaPage
val mangas = mangaPage.mangas
val pageSize = 15
currentSlice = (page - 1) * pageSize
val startIndex = min(mangas.size, currentSlice)
val startIndex = min(mangas.size - 1, currentSlice)
val endIndex = min(mangas.size, currentSlice + pageSize)
val slice = mangas.subList(startIndex, endIndex)