Skip to content

Commit

Permalink
💫 Update: RNIModalPresentationStateMachine
Browse files Browse the repository at this point in the history
Sumamry: Remove `RNIModalPresentationState._wasCancelledPresent`.
  • Loading branch information
dominicstop committed Apr 14, 2023
1 parent f34444e commit 78122b1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
};
};

Expand All @@ -268,8 +268,8 @@ public struct RNIModalPresentationStateMachine {
self._isInitialPresent = false;
};

if self.state.isPresenting {
self._wasCancelledPresent = false;
if self.state.isPresented {
self.wasCancelledPresent = false;
};
};
};

0 comments on commit 78122b1

Please sign in to comment.