Procházet zdrojové kódy

Move stats modal action from history to home view

Deniz Cengiz před 1 rokem
rodič
revize
4430214c98

+ 0 - 12
FreeAPS/Sources/Modules/DataTable/View/DataTableRootView.swift

@@ -110,18 +110,6 @@ extension DataTable {
                 .navigationTitle("History")
                 .navigationBarTitleDisplayMode(.large)
                 .toolbar {
-                    ToolbarItem(placement: .topBarLeading, content: {
-                        Button(
-                            action: { state.showModal(for: .statistics) },
-                            label: {
-                                HStack {
-                                    Text("Statistics")
-                                }
-                            }
-                        )
-                    })
-                }
-                .toolbar {
                     ToolbarItem(placement: .topBarTrailing, content: {
                         addButton({
                             showManualGlucose = true

+ 1 - 1
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -849,7 +849,7 @@ extension Home {
                         buttonColor: (colorScheme == .dark ? Color.white : Color.black).opacity(0.8),
                         label: "Stats",
                         iconString: "chart.line.text.clipboard",
-                        action: { print("open stats") }
+                        action: { state.showModal(for: .statistics) }
                     )
 
                     Spacer()