mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-09 04:08:11 +08:00
Remove more weakSelf/strongSelf errors
Reviewed By: mmmulani Differential Revision: D3555000 fbshipit-source-id: 13b75571a0d09374ee82977cb2acbf1f894479ca
This commit is contained in:
committed by
Facebook Github Bot 2
parent
8baaad9b0f
commit
ceffb085d0
@@ -476,19 +476,28 @@ RCT_EXPORT_MODULE()
|
||||
if (_liveReloadURL) {
|
||||
NSString *liveReloadTitle = _liveReloadEnabled ? @"Disable Live Reload" : @"Enable Live Reload";
|
||||
[items addObject:[RCTDevMenuItem buttonItemWithTitle:liveReloadTitle handler:^{
|
||||
weakSelf.liveReloadEnabled = !self->_liveReloadEnabled;
|
||||
__typeof(self) strongSelf = weakSelf;
|
||||
if (strongSelf) {
|
||||
strongSelf.liveReloadEnabled = !strongSelf->_liveReloadEnabled;
|
||||
}
|
||||
}]];
|
||||
|
||||
NSString *profilingTitle = RCTProfileIsProfiling() ? @"Stop Systrace" : @"Start Systrace";
|
||||
[items addObject:[RCTDevMenuItem buttonItemWithTitle:profilingTitle handler:^{
|
||||
weakSelf.profilingEnabled = !self->_profilingEnabled;
|
||||
__typeof(self) strongSelf = weakSelf;
|
||||
if (strongSelf) {
|
||||
strongSelf.profilingEnabled = !strongSelf->_profilingEnabled;
|
||||
}
|
||||
}]];
|
||||
}
|
||||
|
||||
if ([self hotLoadingAvailable]) {
|
||||
NSString *hotLoadingTitle = _hotLoadingEnabled ? @"Disable Hot Reloading" : @"Enable Hot Reloading";
|
||||
[items addObject:[RCTDevMenuItem buttonItemWithTitle:hotLoadingTitle handler:^{
|
||||
weakSelf.hotLoadingEnabled = !self->_hotLoadingEnabled;
|
||||
__typeof(self) strongSelf = weakSelf;
|
||||
if (strongSelf) {
|
||||
strongSelf.hotLoadingEnabled = !strongSelf->_hotLoadingEnabled;
|
||||
}
|
||||
}]];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user