Skip to content

Commit 4c3f81d

Browse files
authored
Merge branch 'rotorgames:develop' into develop
2 parents a5ca8f7 + 4311730 commit 4c3f81d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Rg.Plugins.Popup/Platforms/Ios/Impl/PopupPlatformIos.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ public Task AddAsync(PopupPage page)
5858
PopupWindow window;
5959
if (IsiOS13OrNewer)
6060
{
61-
var connectedScene = UIApplication.SharedApplication.ConnectedScenes.ToArray().FirstOrDefault(x => x.ActivationState == UISceneActivationState.ForegroundActive);
62-
if (connectedScene != null && connectedScene is UIWindowScene windowScene)
63-
window = new PopupWindow(windowScene);
61+
if (UIApplication.SharedApplication.ConnectedScenes.ToArray()
62+
.FirstOrDefault(x => x.ActivationState == UISceneActivationState.ForegroundActive && x is UIWindowScene) is UIWindowScene connectedScene)
63+
window = new PopupWindow(connectedScene);
6464
else
6565
window = new PopupWindow();
6666

0 commit comments

Comments
 (0)