fix notification 'Missed call'

This commit is contained in:
Danmei Chen 2020-06-15 10:36:46 +02:00
parent 21fbc51405
commit bbd4ad16c5

View file

@ -497,7 +497,7 @@ class CoreManagerDelegate: CoreDelegate {
CallManager.instance().bluetoothEnabled = false
}
if callLog == nil || callLog?.status == .Missed || callLog?.status == .Aborted || callLog?.status == .EarlyAborted {
if UIApplication.shared.applicationState != .active && (callLog == nil || callLog?.status == .Missed || callLog?.status == .Aborted || callLog?.status == .EarlyAborted) {
// Configure the notification's payload.
let content = UNMutableNotificationContent()
content.title = NSString.localizedUserNotificationString(forKey: NSLocalizedString("Missed call", comment: ""), arguments: nil)