diff --git a/Session/Calls/Call Management/SessionCallManager.swift b/Session/Calls/Call Management/SessionCallManager.swift index 451a7365e..9f1718b88 100644 --- a/Session/Calls/Call Management/SessionCallManager.swift +++ b/Session/Calls/Call Management/SessionCallManager.swift @@ -106,6 +106,14 @@ public final class SessionCallManager: NSObject, CallManagerProtocol { } public func reportIncomingCall(_ call: CurrentCallProtocol, callerName: String, completion: @escaping (Error?) -> Void) { + // If CallKit isn't supported then we don't have anything to report the call to + guard Preferences.isCallKitSupported else { + UserDefaults.sharedLokiProject?[.isCallOngoing] = true + UserDefaults.sharedLokiProject?[.lastCallPreOffer] = Date() + completion(nil) + return + } + // Construct a CXCallUpdate describing the incoming call, including the caller. let update = CXCallUpdate() update.localizedCallerName = callerName diff --git a/Session/Calls/Views & Modals/IncomingCallBanner.swift b/Session/Calls/Views & Modals/IncomingCallBanner.swift index 14738a5e7..3c41890f0 100644 --- a/Session/Calls/Views & Modals/IncomingCallBanner.swift +++ b/Session/Calls/Views & Modals/IncomingCallBanner.swift @@ -104,8 +104,8 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate { private func setUpViewHierarchy() { self.clipsToBounds = true - self.layer.cornerRadius = Values.largeSpacing - self.set(.height, to: 100) + self.layer.cornerRadius = 16 + self.set(.height, to: 80) addSubview(backgroundView) backgroundView.pin(to: self) @@ -125,8 +125,8 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate { stackView.spacing = Values.largeSpacing self.addSubview(stackView) - stackView.center(.vertical, in: self) - stackView.set(.width, to: .width, of: self, withOffset: Values.mediumSpacing) + stackView.center(in: self) + stackView.set(.width, to: .width, of: self, withOffset: -Values.mediumSpacing) } private func setUpGestureRecognizers() { @@ -222,8 +222,9 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate { window.addSubview(self) let topMargin = window.safeAreaInsets.top - Values.smallSpacing - self.set(.width, to: .width, of: window, withOffset: Values.smallSpacing) + self.set(.width, to: .width, of: window, withOffset: -Values.smallSpacing) self.pin(.top, to: .top, of: window, withInset: topMargin) + self.center(.horizontal, in: window) UIView.animate(withDuration: 0.5, delay: 0, options: [], animations: { self.alpha = 1.0