mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-08 21:34:34 -05:00
Remove unnecessary "downloadNewChapters" call in "fetchChapters" mutation (#652)
Gets already called by "Chapter::fetchChapterList", thus, this is unnecessary. Additionally, "chapters.toList()" and "chapters.map()" have to be called in a transaction block, which they are not, and thus, cause an unhandled exception, breaking the mutation
This commit is contained in:
@@ -201,7 +201,7 @@ object Chapter {
|
||||
return chapterList
|
||||
}
|
||||
|
||||
fun downloadNewChapters(mangaId: Int, prevNumberOfChapters: Int, newChapters: List<ResultRow>) {
|
||||
private fun downloadNewChapters(mangaId: Int, prevNumberOfChapters: Int, newChapters: List<ResultRow>) {
|
||||
// convert numbers to be index based
|
||||
val currentNumberOfChapters = (prevNumberOfChapters - 1).coerceAtLeast(0)
|
||||
val updatedNumberOfChapters = (newChapters.size - 1).coerceAtLeast(0)
|
||||
|
||||
Reference in New Issue
Block a user