comparison Simoleon/Conversion.swift @ 146:f10b0e188905 v1.3.1

Merge pull request #16 from DennisTechnologies/development Release v1.3.1 committer: GitHub <noreply@github.com>
author Dennis C. M. <dennis@denniscm.com>
date Tue, 17 Aug 2021 22:14:58 +0100
parents 1fd9e27df5be
children 6eac99e99b96
comparison
equal deleted inserted replaced
117:a6df002a0a5c 146:f10b0e188905
10 10
11 struct Conversion: View { 11 struct Conversion: View {
12 var showNavigationView: Bool? 12 var showNavigationView: Bool?
13 13
14 @State var currencyPair: String 14 @State var currencyPair: String
15 @State private var amountToConvert = "1000" 15 @State private var amountToConvert = ""
16 @State private var price: Double = 1.00 16 @State private var price: Double = 1.00
17 @State private var showingConversion = false 17 @State private var showingConversion = false
18 @State private var showingCurrencySelector = false 18 @State private var showingCurrencySelector = false
19 @State private var amountIsEditing = false 19 @State private var amountIsEditing = false
20 20
31 .overlay( 31 .overlay(
32 CurrencyRow(currencyPairName: currencyPair) 32 CurrencyRow(currencyPairName: currencyPair)
33 .padding(.horizontal) 33 .padding(.horizontal)
34 ) 34 )
35 } 35 }
36 .accessibilityIdentifier("OpenCurrencySelector")
36 37
37 FavoriteButton(currencyPair: currencyPair) 38 FavoriteButton(currencyPair: currencyPair)
38 } 39 }
39 40
40 ConversionBox( 41 ConversionBox(
57 if amountIsEditing { 58 if amountIsEditing {
58 Button(action: { 59 Button(action: {
59 UIApplication.shared.dismissKeyboard() 60 UIApplication.shared.dismissKeyboard()
60 amountIsEditing = false 61 amountIsEditing = false
61 }) { 62 }) {
62 Text("Cancel") 63 Text("Done")
63 } 64 }
64 } 65 }
65 } 66 }
66 } 67 }
67 .if(UIDevice.current.userInterfaceIdiom == .phone && showNavigationView ?? true) { content in 68 .if(UIDevice.current.userInterfaceIdiom == .phone && showNavigationView ?? true) { content in