From bdf809e817f75bb792cae2aac662e6a76e0e324a Mon Sep 17 00:00:00 2001 From: Lukas Kurucz Date: Thu, 21 Mar 2019 03:17:58 -0700 Subject: [PATCH] Fix PerfMonitor appearance when reloading JS (#24073) Summary: Fix for this issue I rasied: https://github.com/facebook/react-native/issues/24024 When I toggle `Show Perf Monitor` and reload JS `CMD+R` the Perf Monitor will be hidden, but settings in dev menu will persist. So to fix this state and need to `Hide Perf Monitor` and `Show Perf Monitor` again to see it. [iOS] [Fixed] - Show Perf Monitor, after reloading JS Pull Request resolved: https://github.com/facebook/react-native/pull/24073 Differential Revision: D14560025 Pulled By: cpojer fbshipit-source-id: cd5602bd6ee041b8b3e61d163d10bd8bc47237b9 --- React/Profiler/RCTPerfMonitor.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/React/Profiler/RCTPerfMonitor.m b/React/Profiler/RCTPerfMonitor.m index 57bd0f9ad..1db32322a 100644 --- a/React/Profiler/RCTPerfMonitor.m +++ b/React/Profiler/RCTPerfMonitor.m @@ -156,6 +156,9 @@ RCT_EXPORT_MODULE() if (!_devMenuItem) { __weak __typeof__(self) weakSelf = self; __weak RCTDevSettings *devSettings = self.bridge.devSettings; + if (devSettings.isPerfMonitorShown) { + [weakSelf show]; + } _devMenuItem = [RCTDevMenuItem buttonItemWithTitleBlock:^NSString *{ return (devSettings.isPerfMonitorShown) ?