From 6d97b6c43f8574697611966ac383f181c9d46cb6 Mon Sep 17 00:00:00 2001 From: Dominic Go <18517029+dominicstop@users.noreply.github.com> Date: Sat, 15 Apr 2023 01:11:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AB=20Update:=20`RNIModalData`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related: * `TODO:2023-03-04-13-15-11` - Refactor: Update Modal Events * `TODO:2023-04-14-23-40-15` - Impl. Update `RNIModalData` - Add more modal-related data. --- ios/src_library/React Native/RNIModal/RNIModal+Helpers.swift | 3 +++ ios/src_library/React Native/RNIModal/RNIModalData.swift | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ios/src_library/React Native/RNIModal/RNIModal+Helpers.swift b/ios/src_library/React Native/RNIModal/RNIModal+Helpers.swift index c827c9b5..ca8d1934 100644 --- a/ios/src_library/React Native/RNIModal/RNIModal+Helpers.swift +++ b/ios/src_library/React Native/RNIModal/RNIModal+Helpers.swift @@ -102,6 +102,9 @@ extension RNIModalState where Self: RNIModal { modalPresentationStatePrev: self.modalPresentationState.statePrev, isInitialPresent: self.modalPresentationState.isInitialPresent, + wasCancelledPresent: self.modalPresentationState.wasCancelledPresent, + wasCancelledDismiss: self.modalPresentationState.wasCancelledDismiss, + wasCancelledDismissViaGesture: self.modalPresentationState.wasCancelledDismissViaGesture, diff --git a/ios/src_library/React Native/RNIModal/RNIModalData.swift b/ios/src_library/React Native/RNIModal/RNIModalData.swift index f7c988cd..f32a585c 100644 --- a/ios/src_library/React Native/RNIModal/RNIModalData.swift +++ b/ios/src_library/React Native/RNIModal/RNIModalData.swift @@ -21,8 +21,10 @@ public struct RNIModalData: RNIDictionarySynthesizable { public let modalPresentationState: RNIModalPresentationState; public let modalPresentationStatePrev: RNIModalPresentationState; - + public let isInitialPresent: Bool; + public let wasCancelledPresent: Bool; + public let wasCancelledDismiss: Bool; public let wasCancelledDismissViaGesture: Bool; public let isModalPresented: Bool;