mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 23:24:06 +08:00
Update RCTNavigator.m
Summary: Related to this issue I created the PR. Feel free to talk about it. https://github.com/facebook/react-native/issues/65#issuecomment-93240332 Thanks Closes https://github.com/facebook/react-native/pull/1131 Github Author: Iragne <adelskott@gmail.com> Test Plan: Open NavigatorIOS example in UIExplorer, push recurse navigation several times. Press back and observe that it no longer breaks.
This commit is contained in:
@@ -461,6 +461,10 @@ NSInteger kNeverProgressed = -10000;
|
||||
// --- previously caught up -------- ------- still caught up ----------
|
||||
viewControllerCount == previousReactCount && currentReactCount == previousReactCount;
|
||||
|
||||
BOOL jsGettingtooSlow =
|
||||
// --- previously not caught up -------- ------- no longer caught up ----------
|
||||
viewControllerCount < previousReactCount && currentReactCount < previousReactCount;
|
||||
|
||||
BOOL reactPushOne = jsGettingAhead && currentReactCount == previousReactCount + 1;
|
||||
BOOL reactPopN = jsGettingAhead && currentReactCount < previousReactCount;
|
||||
|
||||
@@ -471,7 +475,8 @@ NSInteger kNeverProgressed = -10000;
|
||||
if (!(jsGettingAhead ||
|
||||
jsCatchingUp ||
|
||||
jsMakingNoProgressButNeedsToCatchUp ||
|
||||
jsMakingNoProgressAndDoesntNeedTo)) {
|
||||
jsMakingNoProgressAndDoesntNeedTo ||
|
||||
jsGettingtooSlow)) {
|
||||
RCTLogError(@"JS has only made partial progress to catch up to UIKit");
|
||||
}
|
||||
if (currentReactCount > _currentViews.count) {
|
||||
|
||||
Reference in New Issue
Block a user