Просмотр исходного кода

Add dragging lines to info display settings

Jonas Björkert 4 месяцев назад
Родитель
Сommit
fd6d470f4e
1 измененных файлов с 13 добавлено и 15 удалено
  1. 13 15
      LoopFollow/InfoDisplaySettings/InfoDisplaySettingsView.swift

+ 13 - 15
LoopFollow/InfoDisplaySettings/InfoDisplaySettingsView.swift

@@ -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)
             }