Skip to content

Commit

Permalink
🛠 Refactor: Rename to isTopMostPresentedVC
Browse files Browse the repository at this point in the history
Related:
* TODO:2023-03-04-06-34-28 - Library Native Cleanup
* TODO:2023-03-17-15-32-16 - Rename to RNIModalView.isModalInFocus

Summary: Rename `RNIModalView.isModalInFocus` to `isTopMostPresentedVC`.
  • Loading branch information
dominicstop committed Mar 21, 2023
1 parent 58f2e9e commit 991b8f2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ios/src_library/React Native/RNIModalView/RNIModalView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,7 @@ class RNIModalView: UIView {
return vcList;
};

// TODO:2023-03-17-15-32-16 - Rename to RNIModalView.isModalInFocus
// * Rename to `isTopMostModal`
private func isModalInFocus() -> Bool {
private func isTopMostPresentedVC() -> Bool {
let presentedViewControllers =
RNIModalManager.sharedInstance.getPresentedViewControllers();

Expand Down Expand Up @@ -570,7 +568,7 @@ class RNIModalView: UIView {
return;
};

let isModalInFocus = self.isModalInFocus();
let isModalInFocus = self.isTopMostPresentedVC();
guard isModalInFocus, self.allowModalForceDismiss else {
#if DEBUG
print("RNIModalView, dismissModal failed: Modal not in focus");
Expand Down

0 comments on commit 991b8f2

Please sign in to comment.