Update app/src/main/java/eu/kanade/presentation/library/LibrarySettingsDialog.kt

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
Jack Hamilton 2024-10-12 15:13:53 -05:00 committed by GitHub
parent ab0893b2d4
commit 36c864d873
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -184,14 +184,10 @@ private fun ColumnScope.SortPage(
MR.strings.action_sort_random to LibrarySort.Type.Random,
).plus(trackerSortOption).map { (titleRes, mode) ->
if (mode == LibrarySort.Type.Random) {
val enabledIcon = if (sortingMode == LibrarySort.Type.Random) {
Icons.Default.Refresh
} else {
null
}
BaseSortItem(
label = stringResource(titleRes),
icon = enabledIcon,
icon = Icons.Default.Refresh
.takeIf { sortingMode == LibrarySort.Type.Random },
onClick = {
screenModel.setSort(category, mode, LibrarySort.Direction.Ascending)
},