Change check to see if any scenes are in the foreground rather than if any scenes are in the background.

This commit is contained in:
Maurice Parker 2019-12-05 18:48:19 -07:00
parent 910e06cf63
commit 2795de3452

View File

@ -56,7 +56,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
var isAnySceneInForeground: Bool {
for scene in UIApplication.shared.connectedScenes {
if scene.activationState != .background {
if scene.activationState == .foregroundInactive || scene.activationState == .foregroundActive {
return true
}
}