From 95d120266d2076709f750f68d858760aeed0a681 Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Thu, 21 Apr 2022 12:17:00 +1000 Subject: [PATCH] show incoming call banner for CallKit disabled cases --- Session/Calls/Views & Modals/IncomingCallBanner.swift | 6 +++--- Session/Meta/AppDelegate.swift | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Session/Calls/Views & Modals/IncomingCallBanner.swift b/Session/Calls/Views & Modals/IncomingCallBanner.swift index c108ceca3..243a40150 100644 --- a/Session/Calls/Views & Modals/IncomingCallBanner.swift +++ b/Session/Calls/Views & Modals/IncomingCallBanner.swift @@ -20,7 +20,7 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate { private lazy var displayNameLabel: UILabel = { let result = UILabel() result.textColor = UIColor.white - result.font = .boldSystemFont(ofSize: Values.largeFontSize) + result.font = .boldSystemFont(ofSize: Values.mediumFontSize) result.lineBreakMode = .byTruncatingTail return result }() @@ -78,8 +78,8 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate { } private func setUpViewHierarchy() { - self.backgroundColor = UIColor(hex: 0x000000).withAlphaComponent(0.9) - self.layer.cornerRadius = Values.veryLargeSpacing + self.backgroundColor = UIColor(hex: 0x000000).withAlphaComponent(0.8) + self.layer.cornerRadius = Values.largeSpacing self.layer.masksToBounds = true self.set(.height, to: 100) profilePictureView.publicKey = call.sessionID diff --git a/Session/Meta/AppDelegate.swift b/Session/Meta/AppDelegate.swift index 7e2985087..0685f19d1 100644 --- a/Session/Meta/AppDelegate.swift +++ b/Session/Meta/AppDelegate.swift @@ -46,6 +46,9 @@ extension AppDelegate { conversationVC.inputAccessoryView?.isHidden = true conversationVC.inputAccessoryView?.alpha = 0 presentingVC.present(callVC, animated: true, completion: nil) + } else if !SSKPreferences.isCallKitSupported { + let incomingCallBanner = IncomingCallBanner(for: call) + incomingCallBanner.show() } } }