Skip to content

Commit

Permalink
🛠 Refactor: Rename RNIModalWrapperMap
Browse files Browse the repository at this point in the history
Summary: Rename type `RNIModalWrapperMap` to `RNIModalViewControllerRegistry`.
  • Loading branch information
dominicstop committed Apr 27, 2023
1 parent b4b1723 commit 62ce749
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ios/src_library/Extensions/UIViewController+Swizzling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation


class RNIModalWrapperMap {
class RNIModalViewControllerRegistry {
static let instanceMap = NSMapTable<
UIViewController,
RNIModalViewControllerWrapper
Expand Down Expand Up @@ -45,7 +45,7 @@ extension UIViewController {
static var isSwizzled = false;

fileprivate var modalWrapper: RNIModalViewControllerWrapper? {
RNIModalWrapperMap.get(forViewController: self);
RNIModalViewControllerRegistry.get(forViewController: self);
};

@discardableResult
Expand All @@ -66,7 +66,7 @@ extension UIViewController {
/// return matching instance.
///
if let modalWrapper =
RNIModalWrapperMap.get(forViewController: viewControllerToPresent) {
RNIModalViewControllerRegistry.get(forViewController: viewControllerToPresent) {

return modalWrapper;
};
Expand All @@ -76,7 +76,7 @@ extension UIViewController {
//
let newModalWrapper = RNIModalViewControllerWrapper();

RNIModalWrapperMap.set(
RNIModalViewControllerRegistry.set(
forViewController: self,
newModalWrapper
);
Expand Down Expand Up @@ -112,7 +112,7 @@ extension UIViewController {

} else if let presentedVC = viewControllerToPresent,
let presentedModalWrapper =
RNIModalWrapperMap.get(forViewController: presentedVC) {
RNIModalViewControllerRegistry.get(forViewController: presentedVC) {

/// C - `viewControllerToPresent` has a corresponding
/// `RNIModalViewControllerWrapper` instance associated to it.
Expand All @@ -121,7 +121,7 @@ extension UIViewController {
} else if let presentingModalWrapper = self.modalWrapper,
let presentedVC = presentingModalWrapper.modalViewController,
let presentedModalWrapper =
RNIModalWrapperMap.get(forViewController: presentedVC) {
RNIModalViewControllerRegistry.get(forViewController: presentedVC) {

/// D - Current vc instance has a `RNIModalViewControllerWrapper`
/// instance associated to it.
Expand Down

0 comments on commit 62ce749

Please sign in to comment.