mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 12:47:26 +01:00
Fix crash when updating library whithout manga to update (#6181)
This commit is contained in:
parent
9ebbfb2d90
commit
27542bc81d
@ -268,7 +268,7 @@ class LibraryUpdateService(
|
|||||||
.sortedWith(rankingScheme[selectedScheme])
|
.sortedWith(rankingScheme[selectedScheme])
|
||||||
|
|
||||||
// Warn when excessively checking a single source
|
// Warn when excessively checking a single source
|
||||||
val maxUpdatesFromSource = mangaToUpdate.groupBy { it.source }.maxOf { it.value.size }
|
val maxUpdatesFromSource = mangaToUpdate.groupBy { it.source }.maxOfOrNull { it.value.size } ?: 0
|
||||||
if (maxUpdatesFromSource > MANGA_PER_SOURCE_QUEUE_WARNING_THRESHOLD) {
|
if (maxUpdatesFromSource > MANGA_PER_SOURCE_QUEUE_WARNING_THRESHOLD) {
|
||||||
toast(R.string.notification_size_warning, Toast.LENGTH_LONG)
|
toast(R.string.notification_size_warning, Toast.LENGTH_LONG)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user