mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
[ios] Add UI for avoiding steps
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
committed by
jeanbaptisteC
parent
dd3b6faa42
commit
37a518cb9b
@@ -44,6 +44,10 @@ struct SettingsNavigationView: View {
|
||||
@State var shouldAvoidMotorwaysWhileRouting: Bool = false
|
||||
|
||||
|
||||
/// If steps should be avoided during routing
|
||||
@State var shouldAvoidStepsWhileRouting: Bool = false
|
||||
|
||||
|
||||
/// The actual view
|
||||
var body: some View {
|
||||
List {
|
||||
@@ -120,6 +124,9 @@ struct SettingsNavigationView: View {
|
||||
|
||||
Toggle("avoid_motorways", isOn: $shouldAvoidMotorwaysWhileRouting)
|
||||
.tint(.accent)
|
||||
|
||||
Toggle("avoid_steps", isOn: $shouldAvoidStepsWhileRouting)
|
||||
.tint(.accent)
|
||||
} header: {
|
||||
Text("driving_options_title")
|
||||
}
|
||||
@@ -138,6 +145,7 @@ struct SettingsNavigationView: View {
|
||||
shouldAvoidUnpavedRoadsWhileRouting = Settings.shouldAvoidUnpavedRoadsWhileRouting
|
||||
shouldAvoidFerriesWhileRouting = Settings.shouldAvoidFerriesWhileRouting
|
||||
shouldAvoidMotorwaysWhileRouting = Settings.shouldAvoidMotorwaysWhileRouting
|
||||
shouldAvoidStepsWhileRouting = Settings.shouldAvoidStepsWhileRouting
|
||||
}
|
||||
.onChange(of: hasPerspectiveViewWhileRouting) { changedHasPerspectiveViewWhileRouting in
|
||||
Settings.hasPerspectiveViewWhileRouting = changedHasPerspectiveViewWhileRouting
|
||||
@@ -174,5 +182,8 @@ struct SettingsNavigationView: View {
|
||||
.onChange(of: shouldAvoidMotorwaysWhileRouting) { changedShouldAvoidMotorwaysWhileRouting in
|
||||
Settings.shouldAvoidMotorwaysWhileRouting = changedShouldAvoidMotorwaysWhileRouting
|
||||
}
|
||||
.onChange(of: shouldAvoidStepsWhileRouting) { changedShouldAvoidStepsWhileRouting in
|
||||
Settings.shouldAvoidStepsWhileRouting = changedShouldAvoidStepsWhileRouting
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user