mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2026-01-30 23:44:16 +01:00
Fix reader
This commit is contained in:
@@ -164,7 +164,7 @@ class ChapterRepositoryImpl(
|
||||
): Flow<ByteArray> {
|
||||
val realUrl = Url("$serverUrl$url")
|
||||
|
||||
return flow { http.get(realUrl, block).readBytes() }
|
||||
return flow { emit(http.get(realUrl, block).readBytes()) }
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -192,8 +192,8 @@ class TachideskPageLoader(
|
||||
currentPage: ReaderPage,
|
||||
amount: Int,
|
||||
): List<PriorityPage> {
|
||||
val pageIndex = currentPage.index2
|
||||
val pages = (currentPage.chapter.pages.value as? PagesState.Success)?.pages ?: return emptyList()
|
||||
val pageIndex = pages.indexOf(currentPage)
|
||||
if (pageIndex >= pages.lastIndex) return emptyList()
|
||||
|
||||
return pages
|
||||
|
||||
Reference in New Issue
Block a user