From 9a1448ffd1ed8386859bad57441cf0ffa27806d9 Mon Sep 17 00:00:00 2001 From: Jhen Date: Fri, 17 Mar 2017 22:58:18 +0800 Subject: [PATCH] Add missing `toggleElementInspector` event send when jsLoaded --- React/Modules/RCTDevSettings.mm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/React/Modules/RCTDevSettings.mm b/React/Modules/RCTDevSettings.mm index 171b2532094..d97aa6031fe 100644 --- a/React/Modules/RCTDevSettings.mm +++ b/React/Modules/RCTDevSettings.mm @@ -454,6 +454,14 @@ - (void)jsLoaded:(NSNotification *)notification dispatch_async(dispatch_get_main_queue(), ^{ // update state again after the bridge has finished loading [self _synchronizeAllSettings]; + + // Inspector can only be shown after JS has loaded + if ([self isElementInspectorShown]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + [self.bridge.eventDispatcher sendDeviceEventWithName:@"toggleElementInspector" body:nil]; +#pragma clang diagnostic pop + } }); }