From 3d33aa656e7308953f4f9494786fd9e1ad5c0169 Mon Sep 17 00:00:00 2001 From: Dominic Go Date: Sun, 29 Sep 2024 13:26:06 +0800 Subject: [PATCH] =?UTF-8?q?=E2=AD=90=EF=B8=8F=20Impl:=20`ModalState.isInPr?= =?UTF-8?q?esentation`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Temp/ModalSheetState.swift | 5 +++++ ios/Temp/ModalState.swift | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ios/Temp/ModalSheetState.swift b/ios/Temp/ModalSheetState.swift index d7111f78..3504adfc 100644 --- a/ios/Temp/ModalSheetState.swift +++ b/ios/Temp/ModalSheetState.swift @@ -61,6 +61,11 @@ public enum ModalSheetState: String { self.modalState.isDismissed; }; + public var isInPresentation: Bool { + !self.isDraggingViaGesture + && self.modalState.isInPresentation + }; + public var isIdle: Bool { switch self { case .draggingViaGesture: diff --git a/ios/Temp/ModalState.swift b/ios/Temp/ModalState.swift index 8b8fc3e3..5cb4b67b 100644 --- a/ios/Temp/ModalState.swift +++ b/ios/Temp/ModalState.swift @@ -44,6 +44,10 @@ public enum ModalState: String { }; }; + public var isInPresentation: Bool { + self.isPresenting || self.isDismissing; + }; + public var modalSheetState: ModalSheetState { switch self { case .presenting: