Skip to content

Commit

Permalink
refactor: use RCTSharedApplication
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed Aug 25, 2022
1 parent 6314305 commit 793a5a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion React/CoreModules/RCTAlertController.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ - (UIWindow *)alertWindow
- (void)show:(BOOL)animated completion:(void (^)(void))completion
{
if (@available(iOS 13.0, *)) {
self.overrideUserInterfaceStyle = UIApplication.sharedApplication.delegate.window.overrideUserInterfaceStyle;
UIUserInterfaceStyle style = RCTSharedApplication().delegate.window.overrideUserInterfaceStyle ?: UIUserInterfaceStyleUnspecified;
self.overrideUserInterfaceStyle = style;
}
[self.alertWindow makeKeyAndVisible];
[self.alertWindow.rootViewController presentViewController:self animated:animated completion:completion];
Expand Down

0 comments on commit 793a5a8

Please sign in to comment.