Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iOS):
activityState
regression check false-positive (#2404)
## Description We had an issue introduced in #2389 that added the preload. We temporarily have an assumption in native stack, that the `activityState` can only progress when `Screen` component is rendered (directly) inside native stack navigator. This invariant was enforced with appropriate checks on native side. It turns out that we were wrong in our way of checking whether the `Screen` belongs to native stack or not - we have forgotten about `RNSContainerNavigationController` class that is used when rendering `ScreenContainer` with `hasTwoStates: true` and which inherits from `RNSNavigationController`. ## Changes ~Added a `isNativeStackViewController` method to `RNSNavigationController` and overrode it in subclass.~ Added `RNSScreenView#isNativeStackScreen` method, which checks whether our direct react superview is a `RNSScreenStackView`. I've found checking for `_controller.navigationController` not reliable, as `navigationController` can be found arbitrarily high in the view hierarchy. ## Test code and steps to reproduce Reported by Expo. If you want to reproduce this: create a JS stack navigator with bottom tabs inside (with `hasTwoStates: true`), and then a regular JS stack inside & try to navigate to any screen. We have not caught that earlier, because we're not testing regular JS stack at all. ## Checklist - [ ] Included code example that can be used to test this change - [x] Ensured that CI passes
- Loading branch information