Explorar o código

remove popup by swipe

Ivan Valkou %!s(int64=5) %!d(string=hai) anos
pai
achega
1c2e299ae5
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  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 {
                     isStatusPopupPresented = false
                 }
+                .gesture(
+                    DragGesture(minimumDistance: 10, coordinateSpace: .local)
+                        .onEnded { value in
+                            if value.translation.height < 0 {
+                                isStatusPopupPresented = false
+                            }
+                        }
+                )
             }
         }
     }