Simplify unlock logic, don't spam challenges
This commit is contained in:
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user