# HG changeset patch # User Dennis Concepción Martín # Date 1627045050 -3600 # Node ID a8d76aa51da294374189c21fbffd072c3490616d # Parent 462c1e823c8f36306b0756788cdd1478b385ff0a Fixes crash textfield diff -r 462c1e823c8f -r a8d76aa51da2 Simoleon.xcodeproj/project.pbxproj --- a/Simoleon.xcodeproj/project.pbxproj Fri Jul 23 13:39:04 2021 +0100 +++ b/Simoleon.xcodeproj/project.pbxproj Fri Jul 23 13:57:30 2021 +0100 @@ -713,7 +713,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Simoleon/Simoleon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_ASSET_PATHS = "\"Simoleon/Preview Content\""; DEVELOPMENT_TEAM = MTX83R5H8X; ENABLE_PREVIEWS = YES; @@ -738,7 +738,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Simoleon/Simoleon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_ASSET_PATHS = "\"Simoleon/Preview Content\""; DEVELOPMENT_TEAM = MTX83R5H8X; ENABLE_PREVIEWS = YES; diff -r 462c1e823c8f -r a8d76aa51da2 Simoleon.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate Binary file Simoleon.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed diff -r 462c1e823c8f -r a8d76aa51da2 Simoleon/Helpers/ConversionBox.swift --- a/Simoleon/Helpers/ConversionBox.swift Fri Jul 23 13:39:04 2021 +0100 +++ b/Simoleon/Helpers/ConversionBox.swift Fri Jul 23 13:57:30 2021 +0100 @@ -9,7 +9,7 @@ struct ConversionBox: View { @Binding var currencyPair: String - @Binding var amountToConvert: String + @Binding var amountToConvert: String { willSet { print(newValue) }} @Binding var price: Double @Binding var showingConversion: Bool @Binding var showingCurrencySelector: Bool @@ -68,7 +68,7 @@ if amountToConvert.isEmpty { /// Avoid nil error when string is empty return 0 } else { - let conversion = Double(amountToConvert)! * price + let conversion = Double(amountToConvert) ?? 0 * price return conversion }