Skip to content

Commit 97e4b0d

Browse files
committed
chore: add changes from comments
1 parent 3c156b8 commit 97e4b0d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ios/RNSScreenStack.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,14 @@ - (void)viewDidLayoutSubviews
7777
RNSScreen *screenController = (RNSScreen *)self.topViewController;
7878
BOOL isNotDismissingModal = screenController.presentedViewController == nil ||
7979
(screenController.presentedViewController != nil &&
80-
![screenController.presentedViewController isBeingDismissed]) ||
80+
![screenController.presentedViewController isBeingDismissed]);
81+
BOOL isPresentingSearchController =
8182
([screenController.presentedViewController isKindOfClass:[UISearchController class]]);
8283

8384
// Calculate header height during simple transition from one screen to another.
8485
// If RNSScreen includes a navigation controller of type RNSNavigationController, it should not calculate
8586
// header height, as it could have nested stack.
86-
if (![screenController hasNestedStack] && isNotDismissingModal) {
87+
if (![screenController hasNestedStack] && (isPresentingSearchController || isNotDismissingModal)) {
8788
[screenController calculateAndNotifyHeaderHeightChangeIsModal:NO];
8889
}
8990

0 commit comments

Comments
 (0)