priority manga update list
This commit is contained in:
parent
c2bfeb443d
commit
d5f41b6c25
1 changed files with 15 additions and 1 deletions
|
|
@ -339,7 +339,21 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet
|
|||
else -> true
|
||||
}
|
||||
}
|
||||
.sortedBy { it.manga.title }
|
||||
.sortedWith(
|
||||
compareByDescending<LibraryManga> {
|
||||
// Prefer manga updating today
|
||||
it.manga.nextUpdate <= fetchWindowUpperBound
|
||||
}.thenByDescending {
|
||||
// Prefer manga the user has started
|
||||
it.lastRead > 0L
|
||||
}.thenByDescending {
|
||||
// Prefer manga that the user has most recently read
|
||||
it.lastRead
|
||||
}.thenByDescending {
|
||||
// Default sorting
|
||||
it.manga.title
|
||||
},
|
||||
)
|
||||
|
||||
notifier.showQueueSizeWarningNotificationIfNeeded(mangaToUpdate)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue