Skip to content

Commit d5f41b6

Browse files
committed
priority manga update list
1 parent c2bfeb4 commit d5f41b6

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt

+15-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,21 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet
339339
else -> true
340340
}
341341
}
342-
.sortedBy { it.manga.title }
342+
.sortedWith(
343+
compareByDescending<LibraryManga> {
344+
// Prefer manga updating today
345+
it.manga.nextUpdate <= fetchWindowUpperBound
346+
}.thenByDescending {
347+
// Prefer manga the user has started
348+
it.lastRead > 0L
349+
}.thenByDescending {
350+
// Prefer manga that the user has most recently read
351+
it.lastRead
352+
}.thenByDescending {
353+
// Default sorting
354+
it.manga.title
355+
},
356+
)
343357

344358
notifier.showQueueSizeWarningNotificationIfNeeded(mangaToUpdate)
345359

0 commit comments

Comments
 (0)