Skip to content

Commit

Permalink
💫 Update: RNIModalViewControllerWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Apr 27, 2023
1 parent 92dbee8 commit 181c45e
Showing 1 changed file with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ public class RNIModalViewControllerWrapper:
self.presentingViewController?.view.window
};

// MARK: -
// ------------------

// MARK: - Functions
// -----------------

public init(){
RNIModalManagerShared.register(modal: self);
Expand Down Expand Up @@ -86,19 +85,31 @@ extension RNIModalViewControllerWrapper: RNIModalRequestable {

extension RNIModalViewControllerWrapper: RNIModalFocusNotifiable {
public func onModalWillFocusNotification(sender: any RNIModal) {
// no-op
}
guard let delegate = self.modalViewController as? RNIModalFocusNotifiable
else { return };

delegate.onModalWillFocusNotification(sender: sender);
};

public func onModalDidFocusNotification(sender: any RNIModal) {
// no-op
guard let delegate = self.modalViewController as? RNIModalFocusNotifiable
else { return };

delegate.onModalDidFocusNotification(sender: sender);
}

public func onModalWillBlurNotification(sender: any RNIModal) {
// no-op
guard let delegate = self.modalViewController as? RNIModalFocusNotifiable
else { return };

delegate.onModalWillBlurNotification(sender: sender);
}

public func onModalDidBlurNotification(sender: any RNIModal) {
// no-op
guard let delegate = self.modalViewController as? RNIModalFocusNotifiable
else { return };

delegate.onModalDidBlurNotification(sender: sender);
}
};

Expand Down

0 comments on commit 181c45e

Please sign in to comment.