ソースを参照

remove popup by swipe

Ivan Valkou 5 年 前
コミット
1c2e299ae5
1 ファイル変更8 行追加0 行削除
  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
+                            }
+                        }
+                )
             }
             }
         }
         }
     }
     }