This commit is contained in:
Maddie Witman
2024-10-12 20:11:08 +08:00
committed by GitHub
5 changed files with 12 additions and 1 deletions

View File

@@ -178,6 +178,7 @@ private fun ColumnScope.SortPage(
MR.strings.action_sort_latest_chapter to LibrarySort.Type.LatestChapter,
MR.strings.action_sort_chapter_fetch_date to LibrarySort.Type.ChapterFetchDate,
MR.strings.action_sort_date_added to LibrarySort.Type.DateAdded,
MR.strings.action_sort_download_count to LibrarySort.Type.DownloadCount,
).plus(trackerSortOption).map { (titleRes, mode) ->
SortItem(
label = stringResource(titleRes),

View File

@@ -300,6 +300,9 @@ class LibraryScreenModel(
val item2Score = trackerScores[i2.libraryManga.id] ?: defaultTrackerScoreSortValue
item1Score.compareTo(item2Score)
}
LibrarySort.Type.DownloadCount -> {
i1.downloadCount.compareTo(i2.downloadCount)
}
}
}