mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Manual: Migrate from bridge.devSettings to RCTModuleRegistry
Summary: Ran `xbgs .devSettings`, and found all the NativeModules that used the bridge to access DevSettings. Then, I migrated them to use RCTModuleRegistry. Changelog: [Internal] Reviewed By: PeteTheHeat Differential Revision: D25503402 fbshipit-source-id: 26afc45cd1bc63d5de99ea331e7b2949b66be7ce
This commit is contained in:
committed by
Facebook GitHub Bot
parent
41929eb9c5
commit
60641c543d
@@ -136,14 +136,16 @@ RCT_EXPORT_MODULE()
|
||||
[commands registerKeyCommandWithInput:@"i"
|
||||
modifierFlags:UIKeyModifierCommand
|
||||
action:^(__unused UIKeyCommand *command) {
|
||||
[weakSelf.bridge.devSettings toggleElementInspector];
|
||||
[(RCTDevSettings *)[weakSelf.moduleRegistry moduleForName:"DevSettings"]
|
||||
toggleElementInspector];
|
||||
}];
|
||||
|
||||
// Reload in normal mode
|
||||
[commands registerKeyCommandWithInput:@"n"
|
||||
modifierFlags:UIKeyModifierCommand
|
||||
action:^(__unused UIKeyCommand *command) {
|
||||
[weakSelf.bridge.devSettings setIsDebuggingRemotely:NO];
|
||||
[(RCTDevSettings *)[weakSelf.moduleRegistry moduleForName:"DevSettings"]
|
||||
setIsDebuggingRemotely:NO];
|
||||
}];
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user