Skip to content

Commit

Permalink
Fix PerfMonitor appearance when reloading JS (#24073)
Browse files Browse the repository at this point in the history
Summary:
Fix for this issue I rasied: #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: #24073

Differential Revision: D14560025

Pulled By: cpojer

fbshipit-source-id: cd5602bd6ee041b8b3e61d163d10bd8bc47237b9
  • Loading branch information
usrbowe authored and facebook-github-bot committed Mar 21, 2019
1 parent 25a58d7 commit 15619c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions React/Profiler/RCTPerfMonitor.m
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ - (RCTDevMenuItem *)devMenuItem
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) ?
Expand Down

0 comments on commit 15619c2

Please sign in to comment.