Sfoglia il codice sorgente

fix issues with double close menu and seems fix issues on greyed buttons

fix issues with double "close" menu and seems fix issues on greyed buttons.

https://github.com/nightscout/Open-iAPS/issues/69
Pierre L 2 anni fa
parent
commit
e778233509

+ 1 - 0
FreeAPS/Sources/Modules/Base/BaseStateModel.swift

@@ -37,6 +37,7 @@ class BaseStateModel<Provider>: StateModel, Injectable where Provider: FreeAPS.P
 
     func hideModal() {
         router.mainModalScreen.send(nil)
+        router.mainSecondaryModalView.send(nil)
     }
 
     func view(for screen: Screen) -> AnyView {

+ 1 - 1
FreeAPS/Sources/Modules/Home/HomeStateModel.swift

@@ -353,7 +353,7 @@ extension Home {
         }
 
         func openCGM() {
-            showModal(for: .cgmDirect)
+            router.mainSecondaryModalView.send(router.view(for: .cgmDirect))
         }
 
         func infoPanelTTPercentage(_ hbt_: Double, _ target: Decimal) -> Decimal {