فهرست منبع

Setting 'displayPresets' properly hides presets #212

Deniz Cengiz 1 سال پیش
والد
کامیت
c4d2279685
1فایلهای تغییر یافته به همراه11 افزوده شده و 9 حذف شده
  1. 11 9
      FreeAPS/Sources/Modules/Treatments/View/TreatmentsRootView.swift

+ 11 - 9
FreeAPS/Sources/Modules/Treatments/View/TreatmentsRootView.swift

@@ -316,15 +316,17 @@ extension Treatments {
                         Text("Close")
                     }
                 }
-                ToolbarItem(placement: .topBarTrailing) {
-                    Button(action: {
-                        showPresetSheet = true
-                    }, label: {
-                        HStack {
-                            Text("Presets")
-                            Image(systemName: "plus")
-                        }
-                    })
+                if state.displayPresets {
+                    ToolbarItem(placement: .topBarTrailing) {
+                        Button(action: {
+                            showPresetSheet = true
+                        }, label: {
+                            HStack {
+                                Text("Presets")
+                                Image(systemName: "pslus")
+                            }
+                        })
+                    }
                 }
             })
             .onAppear {