Split the currency picker's browsable list into Priced/Unpriced

The "Currencies" section (not-yet-added currencies) is now two:
"Priced Currencies" and "Unpriced Currencies", partitioned by
whether the active source quotes a rate for each one. "Current
Currency" and "Selected Currencies" are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXcrACM5sok3M1KQJ8kByy
This commit is contained in:
2026-09-10 15:16:27 +03:00
co-authored by Claude Sonnet 5
parent cc1495a899
commit 0cfa52de56
3 changed files with 44 additions and 7 deletions
@@ -591,19 +591,43 @@ private fun CurrencyPickerScreen(
}
}
if (unselected.isNotEmpty()) {
val (unselectedPriced, unselectedUnpriced) = unselected.partition { state.isPriced(it.code) }
if (unselectedPriced.isNotEmpty()) {
Column {
Text(
stringResource(MR.strings.currencies_section_title).uppercase(),
stringResource(MR.strings.priced_currencies_section_title).uppercase(),
style = SectionHeaderStyle,
modifier = Modifier.padding(bottom = 4.dp),
)
unselected.forEach { info ->
unselectedPriced.forEach { info ->
key(info.code) {
CurrencyRow(
info = info,
isSelected = false,
isPriced = state.isPriced(info.code),
isPriced = true,
sourceName = state.sourceName,
localeCurrencyCode = state.localeCurrencyCode,
onClick = { onToggle(info.code) },
)
}
}
}
}
if (unselectedUnpriced.isNotEmpty()) {
Column {
Text(
stringResource(MR.strings.unpriced_currencies_section_title).uppercase(),
style = SectionHeaderStyle,
modifier = Modifier.padding(bottom = 4.dp),
)
unselectedUnpriced.forEach { info ->
key(info.code) {
CurrencyRow(
info = info,
isSelected = false,
isPriced = false,
sourceName = state.sourceName,
localeCurrencyCode = state.localeCurrencyCode,
onClick = { onToggle(info.code) },