Skip to content

Commit

Permalink
🐞 Fix: .dismissingViaGesture State (Again)
Browse files Browse the repository at this point in the history
Summary:
* Fix `ModalSheetPresentationStateMachine` handling of `ModalSheetState.dismissingViaGesture`.
  • Loading branch information
dominicstop committed Sep 29, 2024
1 parent 00259b1 commit 8bfa246
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions ios/Temp/ModalSheetPresentationStateMachine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ public class ModalSheetPresentationStateMachine {
let prevState = self.prevState;
let currentState = self.currentState;


print(
"setStateExplicit",
"\n - state: \(prevState?.rawValue ?? "N/A") -> \(currentState.rawValue) -> \(nextState.rawValue)",
"\n"
);
// print(
// "setStateExplicit",
// "\n - state: \(prevState?.rawValue ?? "N/A") -> \(currentState.rawValue) -> \(nextState.rawValue)",
// "\n"
// );

#if DEBUG
if Self._debugShouldLog {
Expand Down Expand Up @@ -300,6 +299,10 @@ extension ModalSheetPresentationStateMachine: ModalSheetViewControllerEventsNoti
sender: UIViewController,
panGesture: UIPanGestureRecognizer
) {
guard sender.isBeingDismissed else {
return;
};

switch panGesture.state {
case .began, .changed:
self.isSheetPanGestureActive = true;
Expand Down

0 comments on commit 8bfa246

Please sign in to comment.