From 77545dc29317c1f371dd6e875e1b1d676a22c11b Mon Sep 17 00:00:00 2001 From: Dominic Go Date: Wed, 2 Oct 2024 13:27:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AB=20Update:=20`RNIModalSheetViewDele?= =?UTF-8?q?gate.discardCurrentModalControllerIfNeeded`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/RNIModalSheetView/RNIModalSheetViewDelegate.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ios/RNIModalSheetView/RNIModalSheetViewDelegate.swift b/ios/RNIModalSheetView/RNIModalSheetViewDelegate.swift index fb08454..5fa10f6 100644 --- a/ios/RNIModalSheetView/RNIModalSheetViewDelegate.swift +++ b/ios/RNIModalSheetView/RNIModalSheetViewDelegate.swift @@ -226,10 +226,7 @@ extension RNIModalSheetViewDelegate: RNIContentViewDelegate { fallbackValue: true ); - modalSheetController.dismiss(animated: isAnimated) { - self.discardCurrentModalControllerIfNeeded(); - }; - + modalSheetController.dismiss(animated: isAnimated); resolveBlock([:]); case "getModalMetrics": @@ -369,6 +366,8 @@ extension RNIModalSheetViewDelegate: ModalViewControllerEventsNotifiable { "isAnimated": isAnimated, ] ); + + self.discardCurrentModalControllerIfNeeded(); }; };