Skip to content

Commit

Permalink
💫 Update: RNIModalViewControllerWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed May 15, 2023
1 parent 5365fbb commit 79a05f4
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,28 @@ extension RNIModalViewControllerWrapper: RNIModalRequestable {
sender: Any,
animated: Bool,
completion: @escaping () -> Void
) {
// TBA - no-op
) throws {
throw RNIModalError(
code: .runtimeError,
message: "presenting is not supported"
);
};

public func requestModalToHide(
sender: Any,
animated: Bool,
completion: @escaping () -> Void
) {
// TBA - no-op
) throws {
guard let modalVC = self.modalViewController else {
throw RNIModalError(
code: .runtimeError,
message: "Guard check failed, modalViewController is nil"
);
};

modalVC.dismiss(animated: animated) {
completion();
};
};
};

Expand Down

0 comments on commit 79a05f4

Please sign in to comment.