mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +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(
|
private fun sortNameModeLabel(
|
||||||
resources: Resources,
|
resources: Resources,
|
||||||
mode: SortNameMode,
|
mode: SortNameMode,
|
||||||
@@ -804,7 +807,7 @@ private fun SortNameModeDialog(
|
|||||||
text = {
|
text = {
|
||||||
ChoiceGroup(
|
ChoiceGroup(
|
||||||
header = stringResource(R.string.settings_sort_names_prompt),
|
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,
|
selected = draft,
|
||||||
onSelect = { draft = it },
|
onSelect = { draft = it },
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -75,11 +75,11 @@ class SettingsScreenTest {
|
|||||||
)
|
)
|
||||||
|
|
||||||
composeRule.onNodeWithText("Sort names").performClick()
|
composeRule.onNodeWithText("Sort names").performClick()
|
||||||
composeRule.onNodeWithText("Use regular names").performClick()
|
composeRule.onNodeWithText("Use sort names").performClick()
|
||||||
composeRule.onNodeWithText("Done").performClick()
|
composeRule.onNodeWithText("Done").performClick()
|
||||||
composeRule.waitForIdle()
|
composeRule.waitForIdle()
|
||||||
|
|
||||||
assertEquals(SortNameMode.Name, requested)
|
assertEquals(SortNameMode.SortName, requested)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun renderSettings(
|
private fun renderSettings(
|
||||||
|
|||||||
Reference in New Issue
Block a user