From 94508c291c1a4bcbb5e39c90bad1d690212927bc Mon Sep 17 00:00:00 2001 From: Terry Yiu Date: Wed, 9 Sep 2026 23:45:30 +0300 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01FXcrACM5sok3M1KQJ8kByy --- iosApp/iosApp/ContentView.swift | 4 +++- .../commonMain/kotlin/xyz/tyiu/satsprice/ui/PriceScreen.kt | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/iosApp/iosApp/ContentView.swift b/iosApp/iosApp/ContentView.swift index d598274..6d42e89 100644 --- a/iosApp/iosApp/ContentView.swift +++ b/iosApp/iosApp/ContentView.swift @@ -143,6 +143,7 @@ struct ContentView: View { onChange: { viewModel.onFiatAmountChanged(code: row.code, value: $0) }, isPriced: state.pricedCurrencyCodes.contains(row.code), sourceName: state.sourceName, + isManualSource: state.isManualSource, onMoveUp: index > 0 ? { var codes = displayedRows.map(\.code) codes.move(fromOffsets: [index], toOffset: index - 1) @@ -226,6 +227,7 @@ struct ContentView: View { onChange: @escaping (String) -> Void, isPriced: Bool = true, sourceName: String = "", + isManualSource: Bool = false, onMoveUp: (() -> Void)? = nil, onMoveDown: (() -> Void)? = nil ) -> some View { @@ -252,7 +254,7 @@ struct ContentView: View { #endif VStack(alignment: .leading) { Text(label) - if !isPriced { + if !isPriced && !isManualSource { Text(IosLocalizationKt.localizedFormattedString( resource: MR.strings.shared.currency_not_priced, args: [sourceName] diff --git a/shared/src/commonMain/kotlin/xyz/tyiu/satsprice/ui/PriceScreen.kt b/shared/src/commonMain/kotlin/xyz/tyiu/satsprice/ui/PriceScreen.kt index 2921710..4e370c1 100644 --- a/shared/src/commonMain/kotlin/xyz/tyiu/satsprice/ui/PriceScreen.kt +++ b/shared/src/commonMain/kotlin/xyz/tyiu/satsprice/ui/PriceScreen.kt @@ -350,8 +350,8 @@ fun PriceScreen( keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal), singleLine = true, enabled = isPriced, - isError = !isPriced, - supportingText = if (isPriced) { + isError = !isPriced && !state.isManualSource, + supportingText = if (isPriced || state.isManualSource) { null } else { { Text(stringResource(MR.strings.currency_not_priced, state.sourceName)) }