@@ -123,7 +123,7 @@ struct TimerView: View {
123123 Color ( uiColor: colourScheme == . light ? . systemGray6 : . black)
124124 . ignoresSafeArea ( )
125125
126- // SCRAMBLE
126+ // SCRAMBLE
127127 if stopWatchManager. mode == . inspecting {
128128 if colourScheme == . light {
129129 switch stopWatchManager. inspectionSecs {
@@ -289,6 +289,7 @@ struct TimerView: View {
289289 . font ( . system( size: 15 , weight: . regular) )
290290 }
291291 }
292+ . disabled ( stopWatchManager. scrambleStr == nil )
292293 . accentColor ( accentColour)
293294 . pickerStyle ( . menu)
294295 . onChange ( of: playgroundScrambleType) { newValue in
@@ -657,48 +658,50 @@ struct TimerView: View {
657658
658659 if currentSession. session_type != 2 {
659660 if !stopWatchManager. nilSolve {
660- if !manualInputFocused {
661+ if !manualInputFocused && stopWatchManager . scrambleStr != nil {
661662 Rectangle ( )
662663 . fill ( Color ( uiColor: colourScheme == . light ? . systemGray5 : . systemGray4) )
663664 . frame ( width: 1.5 , height: 20 )
664665 . padding ( . horizontal, 12 )
665666 }
666667 }
667668
668- PenaltyBar ( manualInputFocused ? 68 : 34 ) {
669- Button ( action: {
670- if manualInputFocused {
671- if manualInputTime != " " {
672- stopWatchManager. stop ( timeFromStr ( manualInputTime) )
673-
674-
675- showInputField = false
669+ if stopWatchManager. scrambleStr != nil {
670+ PenaltyBar ( manualInputFocused ? 68 : 34 ) {
671+ Button ( action: {
672+ if manualInputFocused {
673+ if manualInputTime != " " {
674+ stopWatchManager. stop ( timeFromStr ( manualInputTime) )
675+
676+
677+ showInputField = false
678+
679+
680+ manualInputFocused = false
681+
682+ manualInputTime = " "
683+ }
684+ } else {
685+ showInputField = true
676686
687+ DispatchQueue . main. asyncAfter ( deadline: . now( ) + 0.15 ) {
688+ manualInputFocused = true
689+ }
677690
678- manualInputFocused = false
679-
680691 manualInputTime = " "
692+
681693 }
682- } else {
683- showInputField = true
684-
685- DispatchQueue . main. asyncAfter ( deadline: . now( ) + 0.15 ) {
686- manualInputFocused = true
694+ } , label: {
695+ if manualInputFocused {
696+ Text ( " Done " )
697+ . font ( . system( size: 21 , weight: . semibold, design: . rounded) )
698+ } else {
699+ Image ( systemName: " plus.circle " )
700+ . font ( . system( size: 24 , weight: . semibold, design: . rounded) )
687701 }
688-
689- manualInputTime = " "
690-
691- }
692- } , label: {
693- if manualInputFocused {
694- Text ( " Done " )
695- . font ( . system( size: 21 , weight: . semibold, design: . rounded) )
696- } else {
697- Image ( systemName: " plus.circle " )
698- . font ( . system( size: 24 , weight: . semibold, design: . rounded) )
699- }
700- } )
701- . disabled ( manualInputFocused ? ( manualInputTime == " " ) : false )
702+ } )
703+ . disabled ( manualInputFocused ? ( manualInputTime == " " ) : false )
704+ }
702705 }
703706 }
704707 }
0 commit comments