mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Delegate the sending of call notifications to Element Call (#4370)
* Stop sending call notifications manually The Element Call widget can now assume responsibility for sending them when you start a call. * Bump Element Call embedded package to v0.14.0 * Delegate the sending of call notifications to Element Call * Update the SDK. * Use 'is' prefix for boolean --------- Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
@@ -9099,70 +9099,6 @@ class JoinedRoomProxyMock: JoinedRoomProxyProtocol, @unchecked Sendable {
|
||||
return elementCallWidgetDriverDeviceIDReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - sendCallNotificationIfNeeded
|
||||
|
||||
var sendCallNotificationIfNeededUnderlyingCallsCount = 0
|
||||
var sendCallNotificationIfNeededCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return sendCallNotificationIfNeededUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = sendCallNotificationIfNeededUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
sendCallNotificationIfNeededUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
sendCallNotificationIfNeededUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var sendCallNotificationIfNeededCalled: Bool {
|
||||
return sendCallNotificationIfNeededCallsCount > 0
|
||||
}
|
||||
|
||||
var sendCallNotificationIfNeededUnderlyingReturnValue: Result<Void, RoomProxyError>!
|
||||
var sendCallNotificationIfNeededReturnValue: Result<Void, RoomProxyError>! {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return sendCallNotificationIfNeededUnderlyingReturnValue
|
||||
} else {
|
||||
var returnValue: Result<Void, RoomProxyError>? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = sendCallNotificationIfNeededUnderlyingReturnValue
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
sendCallNotificationIfNeededUnderlyingReturnValue = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
sendCallNotificationIfNeededUnderlyingReturnValue = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var sendCallNotificationIfNeededClosure: (() async -> Result<Void, RoomProxyError>)?
|
||||
|
||||
func sendCallNotificationIfNeeded() async -> Result<Void, RoomProxyError> {
|
||||
sendCallNotificationIfNeededCallsCount += 1
|
||||
if let sendCallNotificationIfNeededClosure = sendCallNotificationIfNeededClosure {
|
||||
return await sendCallNotificationIfNeededClosure()
|
||||
} else {
|
||||
return sendCallNotificationIfNeededReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - matrixToPermalink
|
||||
|
||||
var matrixToPermalinkUnderlyingCallsCount = 0
|
||||
|
||||
Reference in New Issue
Block a user