commit 554d9fb318d8109a58b96a90b3db5842f8133026
parent 135d0aa24d8caffd59feedb766e4b4e9ff8f9d43
Author: therealFIGBERT <figbertwelner@gmail.com>
Date: Sat, 23 Nov 2019 20:38:57 -0800
Fix save button error that caused crash, reduce button corner radius to make less ovular
Diffstat:
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/captainsLog/ContentView.swift b/captainsLog/ContentView.swift
@@ -61,15 +61,13 @@ struct ContentView: View {
if (audioRecorder.recording) {
Text("\(self.msg)")
.font(.system(size: 24, weight: .regular, design: .rounded))
- Image(systemName: "waveform")
- .font(.system(size: 50, weight: .regular))
- .imageScale(.large)
- .foregroundColor(.primary)
} else {
Button(action: {
- self.timeElapsed = 0.00
- self.audioRecorder.endRecording()
- self.globalVars.dateListPos = 0
+ if (self.audioRecorder.hasRecorded) {
+ self.timeElapsed = 0.00
+ self.audioRecorder.endRecording()
+ self.globalVars.dateListPos = 0
+ }
}) {
imgTextButtonStyle(sysImg: "waveform", imgSize: 15, buttonText: "Save")
}
diff --git a/captainsLog/Elements.swift b/captainsLog/Elements.swift
@@ -239,6 +239,6 @@ struct imgTextButtonStyle: View {
.padding()
.background(Color.primary)
.foregroundColor(colorScheme == .light ? Color.white : Color.black)
- .cornerRadius(50)
+ .cornerRadius(20)
}
}