[ReactNative] Fix alert out of main thread
Summary: @public I've added an alert to notify when the profile has been generated, but it was being created out of the main thread. Test Plan: Launch the UIExplorer, start and stop profiling, an alert should show up, and everything should just keep working as expected.
This commit is contained in:
parent
0c38229e8e
commit
bd3f9763f7
|
@ -1530,11 +1530,13 @@ RCT_INNER_BRIDGE_ONLY(_invokeAndProcessModule:(__unused NSString *)module
|
|||
if (error) {
|
||||
RCTLogError(@"%@", error.localizedDescription);
|
||||
} else {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[[[UIAlertView alloc] initWithTitle:@"Profile"
|
||||
message:@"The profile has been generated, check the dev server log for instructions."
|
||||
delegate:nil
|
||||
cancelButtonTitle:@"OK"
|
||||
otherButtonTitles:nil] show];
|
||||
});
|
||||
}
|
||||
}];
|
||||
|
||||
|
|
Loading…
Reference in New Issue