Parcourir la source

remove popup by swipe

Ivan Valkou il y a 5 ans
Parent
commit
1c2e299ae5
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

+ 8 - 0
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -155,6 +155,14 @@ extension Home {
                 .onTapGesture {
                 .onTapGesture {
                     isStatusPopupPresented = false
                     isStatusPopupPresented = false
                 }
                 }
+                .gesture(
+                    DragGesture(minimumDistance: 10, coordinateSpace: .local)
+                        .onEnded { value in
+                            if value.translation.height < 0 {
+                                isStatusPopupPresented = false
+                            }
+                        }
+                )
             }
             }
         }
         }
     }
     }