parent
07a466617d
commit
a3f8524300
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'SlimeRead'
|
extName = 'SlimeRead'
|
||||||
extClass = '.SlimeRead'
|
extClass = '.SlimeRead'
|
||||||
extVersionCode = 13
|
extVersionCode = 14
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,12 +110,12 @@ class SlimeRead : HttpSource() {
|
||||||
// Handling a large manga list
|
// Handling a large manga list
|
||||||
return Observable.just(popularMangeCache!!)
|
return Observable.just(popularMangeCache!!)
|
||||||
.map { mangaPage ->
|
.map { mangaPage ->
|
||||||
val (mangas) = mangaPage
|
val mangas = mangaPage.mangas
|
||||||
val pageSize = 15
|
val pageSize = 15
|
||||||
|
|
||||||
currentSlice = (page - 1) * pageSize
|
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 endIndex = min(mangas.size, currentSlice + pageSize)
|
||||||
|
|
||||||
val slice = mangas.subList(startIndex, endIndex)
|
val slice = mangas.subList(startIndex, endIndex)
|
||||||
|
|
Loading…
Reference in New Issue