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

Reorder fat and protein input in treatment view for conformity to edit view (thanks @bjornoleh)

Deniz Cengiz 1 год назад
Родитель
Сommit
d8ac56550a
1 измененных файлов с 7 добавлено и 7 удалено
  1. 7 7
      FreeAPS/Sources/Modules/Treatments/View/TreatmentsRootView.swift

+ 7 - 7
FreeAPS/Sources/Modules/Treatments/View/TreatmentsRootView.swift

@@ -79,31 +79,31 @@ extension Treatments {
         @ViewBuilder private func proteinAndFat() -> some View {
             HStack {
                 HStack {
-                    Text("Fat")
+                    Text("Protein")
+
                     TextFieldWithToolBar(
-                        text: $state.fat,
+                        text: $state.protein,
                         placeholder: "0",
                         keyboardType: .numberPad,
                         numberFormatter: mealFormatter,
                         previousTextField: { focusOnPreviousTextField(index: 2) },
                         nextTextField: { focusOnNextTextField(index: 2) }
-                    ).focused($focusedField, equals: .fat)
+                    ).focused($focusedField, equals: .protein)
                     Text("g").foregroundColor(.secondary)
                 }
 
                 Divider().foregroundStyle(.primary).fontWeight(.bold).frame(width: 10)
 
                 HStack {
-                    Text("Protein")
-
+                    Text("Fat")
                     TextFieldWithToolBar(
-                        text: $state.protein,
+                        text: $state.fat,
                         placeholder: "0",
                         keyboardType: .numberPad,
                         numberFormatter: mealFormatter,
                         previousTextField: { focusOnPreviousTextField(index: 3) },
                         nextTextField: { focusOnNextTextField(index: 3) }
-                    ).focused($focusedField, equals: .protein)
+                    ).focused($focusedField, equals: .fat)
                     Text("g").foregroundColor(.secondary)
                 }
             }