Skip to content

Commit

Permalink
Update app/src/main/java/eu/kanade/presentation/library/LibrarySettin…
Browse files Browse the repository at this point in the history
…gsDialog.kt

Co-authored-by: AntsyLich <[email protected]>
  • Loading branch information
jackhamilton and AntsyLich authored Oct 12, 2024
1 parent ab0893b commit 36c864d
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
Expand Down

0 comments on commit 36c864d

Please sign in to comment.