|
|
@@ -19,25 +19,23 @@ struct InfoDisplaySettingsView: View {
|
|
|
}
|
|
|
|
|
|
Section(header: Text("Information Display Settings")) {
|
|
|
- List {
|
|
|
- ForEach(viewModel.infoSort, id: \.self) { sortedIndex in
|
|
|
- HStack {
|
|
|
- Text(viewModel.getName(for: sortedIndex))
|
|
|
- Spacer()
|
|
|
- Toggle("", isOn: Binding(
|
|
|
- get: { viewModel.infoVisible[sortedIndex] },
|
|
|
- set: { _ in
|
|
|
- viewModel.toggleVisibility(for: sortedIndex)
|
|
|
- }
|
|
|
- ))
|
|
|
- .labelsHidden()
|
|
|
- }
|
|
|
+ ForEach(viewModel.infoSort, id: \.self) { sortedIndex in
|
|
|
+ HStack {
|
|
|
+ Text(viewModel.getName(for: sortedIndex))
|
|
|
+ Spacer()
|
|
|
+ Toggle("", isOn: Binding(
|
|
|
+ get: { viewModel.infoVisible[sortedIndex] },
|
|
|
+ set: { _ in
|
|
|
+ viewModel.toggleVisibility(for: sortedIndex)
|
|
|
+ }
|
|
|
+ ))
|
|
|
+ .labelsHidden()
|
|
|
}
|
|
|
- .onMove(perform: viewModel.move)
|
|
|
}
|
|
|
- .environment(\.editMode, .constant(.active))
|
|
|
+ .onMove(perform: viewModel.move)
|
|
|
}
|
|
|
}
|
|
|
+ .environment(\.editMode, .constant(.active))
|
|
|
.onDisappear {
|
|
|
NotificationCenter.default.post(name: NSNotification.Name("refresh"), object: nil)
|
|
|
}
|