mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
ui: list the default sort mode first
This commit is contained in:
@@ -780,6 +780,9 @@ private fun SyncModeDialog(
|
||||
)
|
||||
}
|
||||
|
||||
private val sortNameModeOptions =
|
||||
listOf(SortNameMode.Name, SortNameMode.SortName, SortNameMode.NonLatin)
|
||||
|
||||
private fun sortNameModeLabel(
|
||||
resources: Resources,
|
||||
mode: SortNameMode,
|
||||
@@ -804,7 +807,7 @@ private fun SortNameModeDialog(
|
||||
text = {
|
||||
ChoiceGroup(
|
||||
header = stringResource(R.string.settings_sort_names_prompt),
|
||||
options = SortNameMode.entries.map { it to sortNameModeLabel(resources, it) },
|
||||
options = sortNameModeOptions.map { it to sortNameModeLabel(resources, it) },
|
||||
selected = draft,
|
||||
onSelect = { draft = it },
|
||||
)
|
||||
|
||||
@@ -75,11 +75,11 @@ class SettingsScreenTest {
|
||||
)
|
||||
|
||||
composeRule.onNodeWithText("Sort names").performClick()
|
||||
composeRule.onNodeWithText("Use regular names").performClick()
|
||||
composeRule.onNodeWithText("Use sort names").performClick()
|
||||
composeRule.onNodeWithText("Done").performClick()
|
||||
composeRule.waitForIdle()
|
||||
|
||||
assertEquals(SortNameMode.Name, requested)
|
||||
assertEquals(SortNameMode.SortName, requested)
|
||||
}
|
||||
|
||||
private fun renderSettings(
|
||||
|
||||
Reference in New Issue
Block a user