Skip to content

Commit

Permalink
Only show DevMenu on shake if RCTView is visible
Browse files Browse the repository at this point in the history
Summary: Changelog: [iOS] Only show Dev Menu on shake if RN view is visible

Reviewed By: fkgozali

Differential Revision: D26138659

fbshipit-source-id: e2db287728675c7ead5fcbf569ed591638e2187e
  • Loading branch information
Peter Argany authored and facebook-github-bot committed Jan 29, 2021
1 parent b0ec350 commit 7186c4d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion React/CoreModules/RCTDevMenu.mm
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,13 @@ - (void)invalidate
- (void)showOnShake
{
if ([((RCTDevSettings *)[_moduleRegistry moduleForName:"DevSettings"]) isShakeToShowDevMenuEnabled]) {
[self show];
for (UIWindow *window in [RCTSharedApplication() windows]) {
NSString *recursiveDescription = [window valueForKey:@"recursiveDescription"];
if ([recursiveDescription containsString:@"RCTView"]) {
[self show];
return;
}
}
}
}

Expand Down

0 comments on commit 7186c4d

Please sign in to comment.