show incoming call banner for CallKit disabled cases

pull/615/head
Ryan Zhao 3 years ago
parent fba6dbcf9b
commit 95d120266d

@ -20,7 +20,7 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate {
private lazy var displayNameLabel: UILabel = { private lazy var displayNameLabel: UILabel = {
let result = UILabel() let result = UILabel()
result.textColor = UIColor.white result.textColor = UIColor.white
result.font = .boldSystemFont(ofSize: Values.largeFontSize) result.font = .boldSystemFont(ofSize: Values.mediumFontSize)
result.lineBreakMode = .byTruncatingTail result.lineBreakMode = .byTruncatingTail
return result return result
}() }()
@ -78,8 +78,8 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate {
} }
private func setUpViewHierarchy() { private func setUpViewHierarchy() {
self.backgroundColor = UIColor(hex: 0x000000).withAlphaComponent(0.9) self.backgroundColor = UIColor(hex: 0x000000).withAlphaComponent(0.8)
self.layer.cornerRadius = Values.veryLargeSpacing self.layer.cornerRadius = Values.largeSpacing
self.layer.masksToBounds = true self.layer.masksToBounds = true
self.set(.height, to: 100) self.set(.height, to: 100)
profilePictureView.publicKey = call.sessionID profilePictureView.publicKey = call.sessionID

@ -46,6 +46,9 @@ extension AppDelegate {
conversationVC.inputAccessoryView?.isHidden = true conversationVC.inputAccessoryView?.isHidden = true
conversationVC.inputAccessoryView?.alpha = 0 conversationVC.inputAccessoryView?.alpha = 0
presentingVC.present(callVC, animated: true, completion: nil) presentingVC.present(callVC, animated: true, completion: nil)
} else if !SSKPreferences.isCallKitSupported {
let incomingCallBanner = IncomingCallBanner(for: call)
incomingCallBanner.show()
} }
} }
} }

Loading…
Cancel
Save