Skip to content

Commit

Permalink
💫 Update: Impl. RNIModalManager.isRegistered
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Apr 12, 2023
1 parent e4dc312 commit 5662635
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ios/src_library/React Native/RNIModal/RNIModalManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,17 @@ public class RNIModalManager {
self.modalInstanceDict[modal.modalNativeID] = modal;
};

public func isRegistered(modal: any RNIModal) -> Bool {
self.modalInstances.contains {
$0.modalNativeID == modal.modalNativeID;
};
};

public func isRegistered(viewController: UIViewController) -> Bool {
self.modalInstances.contains {
$0.presentingViewController === viewController
};
};
public func getModalInstances(
forWindow window: UIWindow
) -> [any RNIModal] {
Expand Down

0 comments on commit 5662635

Please sign in to comment.