Skip to content

Commit

Permalink
Removed toolbar item
Browse files Browse the repository at this point in the history
  • Loading branch information
Snesnopic committed May 24, 2024
1 parent cec7cb4 commit 8681988
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions Morser/Views/EncodeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ struct EncodeView: View {
vibrationEngine.readMorseCode(morseCode: enteredText.morseCode())
}
}

var body: some View {
NavigationView {
VStack {
Expand All @@ -35,19 +34,10 @@ struct EncodeView: View {
.onSubmit {
tryReading()
}
.toolbar {
ToolbarItem(placement: .keyboard) {
Button("Close") {
textFieldIsFocused = false
}
.opacity(enteredText.isEmpty ? 0.0 : 1.0)
}
}
.textInputAutocapitalization(.never)
.textFieldStyle(.roundedBorder)
.disableAutocorrection(true)
.padding(.leading)

Button {
if isRecording {
stopTranscribing()
Expand Down Expand Up @@ -102,12 +92,12 @@ struct EncodeView: View {
.font(.title3)
}
}

Spacer()
.onTapGesture {
textFieldIsFocused = false
}

Button {
if !vibrationEngine.isVibrating() {
print("Size: \(size)")
Expand Down Expand Up @@ -157,7 +147,7 @@ struct EncodeView: View {
.navigationTitle("Encode")
.ignoresSafeArea(.keyboard)
}

}
private func startTranscribing() {
speechRecognizer.resetTranscript()
Expand Down

0 comments on commit 8681988

Please sign in to comment.