mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 10:19:23 +00:00
Fix CallKit title when receiving a call
This commit is contained in:
parent
a11d23af33
commit
9325485da3
1 changed files with 13 additions and 10 deletions
|
|
@ -363,18 +363,21 @@ class TelecomManager: ObservableObject {
|
|||
CoreContext.shared.doOnCoreQueue { _ in
|
||||
ContactsManager.shared.getFriendWithAddressInCoreQueue(address: call.remoteAddress!) { friendResult in
|
||||
if call.remoteAddress != nil {
|
||||
if friendResult != nil && friendResult!.address != nil && friendResult!.address!.displayName != nil {
|
||||
completion(friendResult!.address!.displayName!)
|
||||
} else {
|
||||
if call.remoteAddress!.displayName != nil {
|
||||
completion(call.remoteAddress!.displayName!)
|
||||
} else if call.remoteAddress!.username != nil {
|
||||
completion(call.remoteAddress!.username!)
|
||||
} else {
|
||||
completion(String(call.remoteAddress!.asStringUriOnly().dropFirst(4)))
|
||||
if call.callLog?.wasConference() != true {
|
||||
if let addressFriend = friendResult {
|
||||
completion(addressFriend.name!)
|
||||
} else if let remoteAddress = call.remoteAddress {
|
||||
if remoteAddress.displayName != nil {
|
||||
completion(remoteAddress.displayName!)
|
||||
} else if remoteAddress.username != nil {
|
||||
completion(remoteAddress.username!)
|
||||
} else {
|
||||
completion(String(remoteAddress.asStringUriOnly().dropFirst(4)))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
completion(call.callLog?.conferenceInfo?.subject ?? "Error Conference Name")
|
||||
}
|
||||
|
||||
} else {
|
||||
completion("IncomingDisplayName")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue