Hide the "Not priced by Manual" label for Manual

Manual's default-currency field being unpriced just means no rate has
been typed in yet, not an actual pricing error, so the label (and the
red error styling that came with it) no longer applies when it's the
active source.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXcrACM5sok3M1KQJ8kByy
This commit is contained in:
2026-09-09 23:45:30 +03:00
co-authored by Claude Sonnet 5
parent 0927a04fe8
commit 94508c291c
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -143,6 +143,7 @@ struct ContentView: View {
onChange: { viewModel.onFiatAmountChanged(code: row.code, value: $0) }, onChange: { viewModel.onFiatAmountChanged(code: row.code, value: $0) },
isPriced: state.pricedCurrencyCodes.contains(row.code), isPriced: state.pricedCurrencyCodes.contains(row.code),
sourceName: state.sourceName, sourceName: state.sourceName,
isManualSource: state.isManualSource,
onMoveUp: index > 0 ? { onMoveUp: index > 0 ? {
var codes = displayedRows.map(\.code) var codes = displayedRows.map(\.code)
codes.move(fromOffsets: [index], toOffset: index - 1) codes.move(fromOffsets: [index], toOffset: index - 1)
@@ -226,6 +227,7 @@ struct ContentView: View {
onChange: @escaping (String) -> Void, onChange: @escaping (String) -> Void,
isPriced: Bool = true, isPriced: Bool = true,
sourceName: String = "", sourceName: String = "",
isManualSource: Bool = false,
onMoveUp: (() -> Void)? = nil, onMoveUp: (() -> Void)? = nil,
onMoveDown: (() -> Void)? = nil onMoveDown: (() -> Void)? = nil
) -> some View { ) -> some View {
@@ -252,7 +254,7 @@ struct ContentView: View {
#endif #endif
VStack(alignment: .leading) { VStack(alignment: .leading) {
Text(label) Text(label)
if !isPriced { if !isPriced && !isManualSource {
Text(IosLocalizationKt.localizedFormattedString( Text(IosLocalizationKt.localizedFormattedString(
resource: MR.strings.shared.currency_not_priced, resource: MR.strings.shared.currency_not_priced,
args: [sourceName] args: [sourceName]
@@ -350,8 +350,8 @@ fun PriceScreen(
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal), keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal),
singleLine = true, singleLine = true,
enabled = isPriced, enabled = isPriced,
isError = !isPriced, isError = !isPriced && !state.isManualSource,
supportingText = if (isPriced) { supportingText = if (isPriced || state.isManualSource) {
null null
} else { } else {
{ Text(stringResource(MR.strings.currency_not_priced, state.sourceName)) } { Text(stringResource(MR.strings.currency_not_priced, state.sourceName)) }