Simplify unlock logic, don't spam challenges

This commit is contained in:
Christoph Hagen
2023-12-12 23:46:51 +01:00
parent 941aebd9ca
commit b749a80f5d
3 changed files with 80 additions and 129 deletions

View File

@ -24,6 +24,13 @@ struct ContentView: View {
.white
}
private var stateText: String {
if coordinator.state == .notChecked {
return "Unlock"
}
return coordinator.state.description
}
var body: some View {
HStack {
Spacer()
@ -39,7 +46,7 @@ struct ContentView: View {
.progressViewStyle(CircularProgressViewStyle())
.frame(width: 20, height: 20)
} else {
Text("Unlock")
Text(stateText)
.font(.subheadline)
}
}