Skip to content

Commit

Permalink
🐞 Fix: RNIModalSheetViewController.setupExitAnimation
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Oct 8, 2024
1 parent efc00cf commit ba4f123
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions ios/RNIModalSheetView/RNIModalSheetViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,20 @@ open class RNIModalSheetViewController: ModalSheetViewControllerLifecycleNotifie
let animationBlocks = bottomOverlayController.createExitAnimationBlocks();

animationBlocks.start();
transitionCoordinator.animate { context in
animationBlocks.end();
transitionCoordinator.animate {
if $0.isCancelled {
animationBlocks.start();

} else {
animationBlocks.end();
};

} completion: { context in
guard context.isCancelled else {
return
};

animationBlocks.start();
};
};
};
Expand Down

0 comments on commit ba4f123

Please sign in to comment.