Do not trigger onEnterBackground // onEnterForeground corecontext event when there is a call in progress. This avoids a UI deadlock from iOS video filters when entering foreground with video capture active

This commit is contained in:
QuentinArguillere 2025-01-13 14:36:45 +01:00
parent 0b910ca190
commit b3d83c1580

View file

@ -237,13 +237,15 @@ struct LinphoneApp: App {
}
}
}.onChange(of: scenePhase) { newPhase in
if newPhase == .active {
Log.info("Entering foreground")
coreContext.onEnterForeground()
} else if newPhase == .inactive {
} else if newPhase == .background {
Log.info("Entering background")
coreContext.onEnterBackground()
if !TelecomManager.shared.callInProgress {
if newPhase == .active {
Log.info("Entering foreground")
coreContext.onEnterForeground()
} else if newPhase == .inactive {
} else if newPhase == .background {
Log.info("Entering background")
coreContext.onEnterBackground()
}
}
}
}