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:
Ramanpreet Nara
2020-12-12 19:02:03 -08:00
committed by Facebook GitHub Bot
parent 41929eb9c5
commit 60641c543d
+4 -2
View File
@@ -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
}