Update LibraryUpdateService.kt

This commit is contained in:
Jay 2020-02-10 22:41:07 -08:00
parent eddfeff146
commit c0250ab1ee

View file

@ -361,7 +361,7 @@ class LibraryUpdateService(
downloadChapters(manga, newChapters.sortedBy { it.chapter_number }) downloadChapters(manga, newChapters.sortedBy { it.chapter_number })
hasDownloads = true hasDownloads = true
} }
newUpdates.add(manga to newChapters.toTypedArray()) newUpdates.add(manga to newChapters.sortedBy { it.chapter_number }.toTypedArray())
} }
} }
} }
@ -507,7 +507,7 @@ class LibraryUpdateService(
updates.forEach { updates.forEach {
val manga = it.first val manga = it.first
val chapters = it.second val chapters = it.second
val chapterNames = chapters.map { chapter -> chapter.name }.toSet() val chapterNames = chapters.map { chapter -> chapter.name }
notifications.add(Pair(notification(Notifications.CHANNEL_NEW_CHAPTERS) { notifications.add(Pair(notification(Notifications.CHANNEL_NEW_CHAPTERS) {
setSmallIcon(R.drawable.ic_tachi) setSmallIcon(R.drawable.ic_tachi)
try { try {