@@ -43,40 +43,43 @@ struct SideWalkWidthForm: View, QuestForm {
4343 if isAlert {
4444 // Dismiss the keyboard when confirmation is given
4545 UIApplication . shared. sendAction ( #selector( UIResponder . resignFirstResponder) , to: nil , from: nil , for: nil )
46+ processAnswer ( )
4647 }
48+
4749 }
4850 . padding ( . top, 10 )
4951 Spacer ( )
5052 } . padding ( )
5153 . frame ( maxWidth: . infinity, maxHeight: . infinity)
52- . alert ( isPresented: $isConfirmAlert) {
53- if !( feet >= 1 && feet <= 12 ) {
54- return Alert (
55- title: Text ( LocalizedStrings . questGenericConfirmationTitle. localized) ,
56- message: Text ( LocalizedStrings . questRoadWidthUnusualInputConfirmation. localized) ,
57- primaryButton: . default( Text ( LocalizedStrings . questGenericConfirmationYes. localized) ) {
58- processAnswer ( )
59- } ,
60- secondaryButton: . default( Text ( LocalizedStrings . questGenericConfirmationNo. localized) )
61- )
62- } else {
63- return Alert (
64- title: Text ( LocalizedStrings . questSourceDialogTitle. localized) ,
65- message: Text ( LocalizedStrings . questSourceDialogNote. localized) ,
66- primaryButton: . default( Text ( LocalizedStrings . questGenericConfirmationYes. localized) ) {
67- processAnswer ( )
68- } ,
69- secondaryButton: . default( Text ( LocalizedStrings . undoConfirmNegative. localized) )
70- )
71- }
72-
73- }
54+ // .alert(isPresented: $isConfirmAlert) {
55+ // if !(feet >= 1 && feet <= 12) {
56+ // return Alert(
57+ // title: Text(LocalizedStrings.questGenericConfirmationTitle.localized),
58+ // message: Text(LocalizedStrings.questRoadWidthUnusualInputConfirmation.localized),
59+ // primaryButton: .default(Text(LocalizedStrings.questGenericConfirmationYes.localized)) {
60+ // processAnswer()
61+ // },
62+ // secondaryButton: .default(Text(LocalizedStrings.questGenericConfirmationNo.localized))
63+ // )
64+ // } else {
65+ // return Alert(
66+ // title: Text(LocalizedStrings.questSourceDialogTitle.localized),
67+ // message: Text(LocalizedStrings.questSourceDialogNote.localized),
68+ // primaryButton: .default(Text(LocalizedStrings.questGenericConfirmationYes.localized)) {
69+ // processAnswer()
70+ // },
71+ // secondaryButton: .default(Text(LocalizedStrings.undoConfirmNegative.localized))
72+ // )
73+ // }
74+ //
75+ // }
7476 }
7577
7678 func processAnswer( ) {
7779 let width = self . convertFeetToMeter ( feet: feet, inches: inches)
7880 let answer = WidthAnswer ( width: width, units: " m " , isARMeasurement: false )
7981 action ? ( answer)
82+ isConfirmAlert = false
8083 }
8184
8285 func convertFeetToMeter( feet: Int , inches: Int ) -> String {
0 commit comments