mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Remove GenericCallLinkCoordinator, merging it into CallScreen. (#3181)
* Remove incorrect message send call and fix typo. * Add overlay coordinator presentation to the NavigationRootCoordinator. * Remove GenericCallLinkCoordinator, merging it into CallScreen. This will allow for picture in picture on call links when available.
This commit is contained in:
@@ -5142,17 +5142,17 @@ class ElementCallWidgetDriverMock: ElementCallWidgetDriverProtocol {
|
||||
return startBaseURLClientIDColorSchemeReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - sendMessage
|
||||
//MARK: - handleMessage
|
||||
|
||||
var sendMessageUnderlyingCallsCount = 0
|
||||
var sendMessageCallsCount: Int {
|
||||
var handleMessageUnderlyingCallsCount = 0
|
||||
var handleMessageCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return sendMessageUnderlyingCallsCount
|
||||
return handleMessageUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = sendMessageUnderlyingCallsCount
|
||||
returnValue = handleMessageUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
@@ -5160,29 +5160,29 @@ class ElementCallWidgetDriverMock: ElementCallWidgetDriverProtocol {
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
sendMessageUnderlyingCallsCount = newValue
|
||||
handleMessageUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
sendMessageUnderlyingCallsCount = newValue
|
||||
handleMessageUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var sendMessageCalled: Bool {
|
||||
return sendMessageCallsCount > 0
|
||||
var handleMessageCalled: Bool {
|
||||
return handleMessageCallsCount > 0
|
||||
}
|
||||
var sendMessageReceivedMessage: String?
|
||||
var sendMessageReceivedInvocations: [String] = []
|
||||
var handleMessageReceivedMessage: String?
|
||||
var handleMessageReceivedInvocations: [String] = []
|
||||
|
||||
var sendMessageUnderlyingReturnValue: Result<Bool, ElementCallWidgetDriverError>!
|
||||
var sendMessageReturnValue: Result<Bool, ElementCallWidgetDriverError>! {
|
||||
var handleMessageUnderlyingReturnValue: Result<Bool, ElementCallWidgetDriverError>!
|
||||
var handleMessageReturnValue: Result<Bool, ElementCallWidgetDriverError>! {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return sendMessageUnderlyingReturnValue
|
||||
return handleMessageUnderlyingReturnValue
|
||||
} else {
|
||||
var returnValue: Result<Bool, ElementCallWidgetDriverError>? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = sendMessageUnderlyingReturnValue
|
||||
returnValue = handleMessageUnderlyingReturnValue
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
@@ -5190,26 +5190,26 @@ class ElementCallWidgetDriverMock: ElementCallWidgetDriverProtocol {
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
sendMessageUnderlyingReturnValue = newValue
|
||||
handleMessageUnderlyingReturnValue = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
sendMessageUnderlyingReturnValue = newValue
|
||||
handleMessageUnderlyingReturnValue = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var sendMessageClosure: ((String) async -> Result<Bool, ElementCallWidgetDriverError>)?
|
||||
var handleMessageClosure: ((String) async -> Result<Bool, ElementCallWidgetDriverError>)?
|
||||
|
||||
func sendMessage(_ message: String) async -> Result<Bool, ElementCallWidgetDriverError> {
|
||||
sendMessageCallsCount += 1
|
||||
sendMessageReceivedMessage = message
|
||||
func handleMessage(_ message: String) async -> Result<Bool, ElementCallWidgetDriverError> {
|
||||
handleMessageCallsCount += 1
|
||||
handleMessageReceivedMessage = message
|
||||
DispatchQueue.main.async {
|
||||
self.sendMessageReceivedInvocations.append(message)
|
||||
self.handleMessageReceivedInvocations.append(message)
|
||||
}
|
||||
if let sendMessageClosure = sendMessageClosure {
|
||||
return await sendMessageClosure(message)
|
||||
if let handleMessageClosure = handleMessageClosure {
|
||||
return await handleMessageClosure(message)
|
||||
} else {
|
||||
return sendMessageReturnValue
|
||||
return handleMessageReturnValue
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11129,17 +11129,17 @@ class RoomProxyMock: RoomProxyProtocol {
|
||||
return elementCallWidgetDriverDeviceIDReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - sendCallNotificationIfNeeeded
|
||||
//MARK: - sendCallNotificationIfNeeded
|
||||
|
||||
var sendCallNotificationIfNeeededUnderlyingCallsCount = 0
|
||||
var sendCallNotificationIfNeeededCallsCount: Int {
|
||||
var sendCallNotificationIfNeededUnderlyingCallsCount = 0
|
||||
var sendCallNotificationIfNeededCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return sendCallNotificationIfNeeededUnderlyingCallsCount
|
||||
return sendCallNotificationIfNeededUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = sendCallNotificationIfNeeededUnderlyingCallsCount
|
||||
returnValue = sendCallNotificationIfNeededUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
@@ -11147,27 +11147,27 @@ class RoomProxyMock: RoomProxyProtocol {
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
sendCallNotificationIfNeeededUnderlyingCallsCount = newValue
|
||||
sendCallNotificationIfNeededUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
sendCallNotificationIfNeeededUnderlyingCallsCount = newValue
|
||||
sendCallNotificationIfNeededUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var sendCallNotificationIfNeeededCalled: Bool {
|
||||
return sendCallNotificationIfNeeededCallsCount > 0
|
||||
var sendCallNotificationIfNeededCalled: Bool {
|
||||
return sendCallNotificationIfNeededCallsCount > 0
|
||||
}
|
||||
|
||||
var sendCallNotificationIfNeeededUnderlyingReturnValue: Result<Void, RoomProxyError>!
|
||||
var sendCallNotificationIfNeeededReturnValue: Result<Void, RoomProxyError>! {
|
||||
var sendCallNotificationIfNeededUnderlyingReturnValue: Result<Void, RoomProxyError>!
|
||||
var sendCallNotificationIfNeededReturnValue: Result<Void, RoomProxyError>! {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return sendCallNotificationIfNeeededUnderlyingReturnValue
|
||||
return sendCallNotificationIfNeededUnderlyingReturnValue
|
||||
} else {
|
||||
var returnValue: Result<Void, RoomProxyError>? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = sendCallNotificationIfNeeededUnderlyingReturnValue
|
||||
returnValue = sendCallNotificationIfNeededUnderlyingReturnValue
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
@@ -11175,22 +11175,22 @@ class RoomProxyMock: RoomProxyProtocol {
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
sendCallNotificationIfNeeededUnderlyingReturnValue = newValue
|
||||
sendCallNotificationIfNeededUnderlyingReturnValue = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
sendCallNotificationIfNeeededUnderlyingReturnValue = newValue
|
||||
sendCallNotificationIfNeededUnderlyingReturnValue = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var sendCallNotificationIfNeeededClosure: (() async -> Result<Void, RoomProxyError>)?
|
||||
var sendCallNotificationIfNeededClosure: (() async -> Result<Void, RoomProxyError>)?
|
||||
|
||||
func sendCallNotificationIfNeeeded() async -> Result<Void, RoomProxyError> {
|
||||
sendCallNotificationIfNeeededCallsCount += 1
|
||||
if let sendCallNotificationIfNeeededClosure = sendCallNotificationIfNeeededClosure {
|
||||
return await sendCallNotificationIfNeeededClosure()
|
||||
func sendCallNotificationIfNeeded() async -> Result<Void, RoomProxyError> {
|
||||
sendCallNotificationIfNeededCallsCount += 1
|
||||
if let sendCallNotificationIfNeededClosure = sendCallNotificationIfNeededClosure {
|
||||
return await sendCallNotificationIfNeededClosure()
|
||||
} else {
|
||||
return sendCallNotificationIfNeeededReturnValue
|
||||
return sendCallNotificationIfNeededReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - matrixToPermalink
|
||||
|
||||
Reference in New Issue
Block a user