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-11 21:07:08 -05:00 committed by GitHub
parent d328ded17f
commit 2eb1580788
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -183,8 +183,7 @@ private fun ColumnScope.SortPage(
MR.strings.action_sort_date_added to LibrarySort.Type.DateAdded,
MR.strings.action_sort_random to LibrarySort.Type.Random,
).plus(trackerSortOption).map { (titleRes, mode) ->
when(mode) {
LibrarySort.Type.Random -> {
if (mode == LibrarySort.Type.Random) {
NondirectionalSortItem(
label = stringResource(titleRes),
enabled = sortingMode == LibrarySort.Type.Random,
@ -193,8 +192,8 @@ private fun ColumnScope.SortPage(
screenModel.setSort(category, mode, LibrarySort.Direction.Ascending)
},
)
return@map
}
else -> {
SortItem(
label = stringResource(titleRes),
sortDescending = sortDescending.takeIf { sortingMode == mode },
@ -216,8 +215,6 @@ private fun ColumnScope.SortPage(
},
)
}
}
}
}
private val displayModes = listOf(