Skip to content

Commit

Permalink
Merge pull request #17 from teufelaudio/fixHomeGestureCollision
Browse files Browse the repository at this point in the history
Fix home gesture collision
  • Loading branch information
weitieda authored Apr 30, 2022
2 parents b924a83 + 6f0bc6b commit 9233e6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ BottomSheet adheres to [Semantic Versioning](http://semver.org/).

### Changed

Fix half-opened bottom sheet when returning from background.

- 1.0.6

Removing List padding on examples.
Expand Down
4 changes: 3 additions & 1 deletion Sources/BottomSheet/BottomSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ public struct BottomSheet<Content: View>: View {
.gesture(
DragGesture()
.onChanged({ (value) in

// ignore gestures while the sheet is hidden. Otherwise it could collide with the iOS-global "go to homescreen"-gesture
guard isPresented else { return }

let offsetY = value.translation.height
self.draggedOffset = offsetY

Expand Down

0 comments on commit 9233e6e

Please sign in to comment.