mirror of
https://github.com/mihonapp/mihon.git
synced 2025-02-12 18:18:55 +01:00
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:
parent
d328ded17f
commit
2eb1580788
@ -183,8 +183,7 @@ private fun ColumnScope.SortPage(
|
|||||||
MR.strings.action_sort_date_added to LibrarySort.Type.DateAdded,
|
MR.strings.action_sort_date_added to LibrarySort.Type.DateAdded,
|
||||||
MR.strings.action_sort_random to LibrarySort.Type.Random,
|
MR.strings.action_sort_random to LibrarySort.Type.Random,
|
||||||
).plus(trackerSortOption).map { (titleRes, mode) ->
|
).plus(trackerSortOption).map { (titleRes, mode) ->
|
||||||
when(mode) {
|
if (mode == LibrarySort.Type.Random) {
|
||||||
LibrarySort.Type.Random -> {
|
|
||||||
NondirectionalSortItem(
|
NondirectionalSortItem(
|
||||||
label = stringResource(titleRes),
|
label = stringResource(titleRes),
|
||||||
enabled = sortingMode == LibrarySort.Type.Random,
|
enabled = sortingMode == LibrarySort.Type.Random,
|
||||||
@ -193,8 +192,8 @@ private fun ColumnScope.SortPage(
|
|||||||
screenModel.setSort(category, mode, LibrarySort.Direction.Ascending)
|
screenModel.setSort(category, mode, LibrarySort.Direction.Ascending)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
return@map
|
||||||
}
|
}
|
||||||
else -> {
|
|
||||||
SortItem(
|
SortItem(
|
||||||
label = stringResource(titleRes),
|
label = stringResource(titleRes),
|
||||||
sortDescending = sortDescending.takeIf { sortingMode == mode },
|
sortDescending = sortDescending.takeIf { sortingMode == mode },
|
||||||
@ -216,8 +215,6 @@ private fun ColumnScope.SortPage(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private val displayModes = listOf(
|
private val displayModes = listOf(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user