From 3d40194fcf1eda771aa043fcc8d2d8254c187590 Mon Sep 17 00:00:00 2001 From: Dominic Go Date: Mon, 30 Sep 2024 18:36:50 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Fix:=20`ModalViewControllerEvent?= =?UTF-8?q?sNotifiable.notifyOnModalDidDismiss`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Temp/ModalViewControllerLifecycleNotifier.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ios/Temp/ModalViewControllerLifecycleNotifier.swift b/ios/Temp/ModalViewControllerLifecycleNotifier.swift index a98573b4..9b8be75b 100644 --- a/ios/Temp/ModalViewControllerLifecycleNotifier.swift +++ b/ios/Temp/ModalViewControllerLifecycleNotifier.swift @@ -91,6 +91,7 @@ open class ModalViewControllerLifecycleNotifier: ViewControllerLifecycleNotifier transitionCoordinator.notifyWhenInteractionChanges { context in guard !context.isCancelled else { + self.isExplicitlyBeingDismissed = false; return; }; @@ -123,4 +124,15 @@ open class ModalViewControllerLifecycleNotifier: ViewControllerLifecycleNotifier ); }; }; + + // MARK: - Methods + // --------------- + + open override func dismiss( + animated flag: Bool, + completion: (() -> Void)? = nil + ) { + self.isExplicitlyBeingDismissed = true; + super.dismiss(animated: flag, completion: completion); + } };