From 78122b1a6b6a6f4947b21b6e3d7f1605c4ca7332 Mon Sep 17 00:00:00 2001 From: Dominic Go <18517029+dominicstop@users.noreply.github.com> Date: Sat, 15 Apr 2023 00:57:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AB=20Update:=20`RNIModalPresentationS?= =?UTF-8?q?tateMachine`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sumamry: Remove `RNIModalPresentationState._wasCancelledPresent`. --- .../RNIModal/RNIModalPresentationState.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ios/src_library/React Native/RNIModal/RNIModalPresentationState.swift b/ios/src_library/React Native/RNIModal/RNIModalPresentationState.swift index 7e451600..3cc3b277 100644 --- a/ios/src_library/React Native/RNIModal/RNIModalPresentationState.swift +++ b/ios/src_library/React Native/RNIModal/RNIModalPresentationState.swift @@ -157,8 +157,8 @@ public struct RNIModalPresentationStateMachine { // ------------------ private var _isInitialPresent: Bool? = nil; - private var _wasCancelledPresent: Bool = false; + public var wasCancelledPresent: Bool = false; public var wasCancelledDismissViaGesture: Bool = false; // MARK: - Computed Properties @@ -256,8 +256,8 @@ public struct RNIModalPresentationStateMachine { self._isInitialPresent = false; }; - if prevState.isPresenting && nextState.isDismissing { - self._wasCancelledPresent = true; + if prevState.isPresenting && nextState.isDismissedOrDismissing { + self.wasCancelledPresent = true; }; }; @@ -268,8 +268,8 @@ public struct RNIModalPresentationStateMachine { self._isInitialPresent = false; }; - if self.state.isPresenting { - self._wasCancelledPresent = false; + if self.state.isPresented { + self.wasCancelledPresent = false; }; }; };