mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
Update the SDK. (#4517)
This commit is contained in:
@@ -9322,7 +9322,7 @@
|
||||
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 25.09.15;
|
||||
version = "25.09.17-2";
|
||||
};
|
||||
};
|
||||
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
|
||||
|
||||
@@ -158,8 +158,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
|
||||
"state" : {
|
||||
"revision" : "057d3eadee753c8dbb4af3dd1b57947ef061a131",
|
||||
"version" : "25.9.15"
|
||||
"revision" : "d4b8e73d2ad8676fd711a2a0e7603b14ad4b0151",
|
||||
"version" : "25.9.17-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -21658,6 +21658,71 @@ open class SpaceRoomListSDKMock: MatrixRustSDK.SpaceRoomList, @unchecked Sendabl
|
||||
}
|
||||
}
|
||||
|
||||
//MARK: - space
|
||||
|
||||
var spaceUnderlyingCallsCount = 0
|
||||
open var spaceCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return spaceUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = spaceUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
spaceUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
spaceUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
open var spaceCalled: Bool {
|
||||
return spaceCallsCount > 0
|
||||
}
|
||||
|
||||
var spaceUnderlyingReturnValue: SpaceRoom?
|
||||
open var spaceReturnValue: SpaceRoom? {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return spaceUnderlyingReturnValue
|
||||
} else {
|
||||
var returnValue: SpaceRoom?? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = spaceUnderlyingReturnValue
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
spaceUnderlyingReturnValue = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
spaceUnderlyingReturnValue = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
open var spaceClosure: (() -> SpaceRoom?)?
|
||||
|
||||
open override func space() -> SpaceRoom? {
|
||||
spaceCallsCount += 1
|
||||
if let spaceClosure = spaceClosure {
|
||||
return spaceClosure()
|
||||
} else {
|
||||
return spaceReturnValue
|
||||
}
|
||||
}
|
||||
|
||||
//MARK: - subscribeToPaginationStateUpdates
|
||||
|
||||
var subscribeToPaginationStateUpdatesListenerUnderlyingCallsCount = 0
|
||||
@@ -21799,6 +21864,77 @@ open class SpaceRoomListSDKMock: MatrixRustSDK.SpaceRoomList, @unchecked Sendabl
|
||||
return subscribeToRoomUpdateListenerReturnValue
|
||||
}
|
||||
}
|
||||
|
||||
//MARK: - subscribeToSpaceUpdates
|
||||
|
||||
var subscribeToSpaceUpdatesListenerUnderlyingCallsCount = 0
|
||||
open var subscribeToSpaceUpdatesListenerCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return subscribeToSpaceUpdatesListenerUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = subscribeToSpaceUpdatesListenerUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
subscribeToSpaceUpdatesListenerUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
subscribeToSpaceUpdatesListenerUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
open var subscribeToSpaceUpdatesListenerCalled: Bool {
|
||||
return subscribeToSpaceUpdatesListenerCallsCount > 0
|
||||
}
|
||||
open var subscribeToSpaceUpdatesListenerReceivedListener: SpaceRoomListSpaceListener?
|
||||
open var subscribeToSpaceUpdatesListenerReceivedInvocations: [SpaceRoomListSpaceListener] = []
|
||||
|
||||
var subscribeToSpaceUpdatesListenerUnderlyingReturnValue: TaskHandle!
|
||||
open var subscribeToSpaceUpdatesListenerReturnValue: TaskHandle! {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return subscribeToSpaceUpdatesListenerUnderlyingReturnValue
|
||||
} else {
|
||||
var returnValue: TaskHandle? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = subscribeToSpaceUpdatesListenerUnderlyingReturnValue
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
subscribeToSpaceUpdatesListenerUnderlyingReturnValue = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
subscribeToSpaceUpdatesListenerUnderlyingReturnValue = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
open var subscribeToSpaceUpdatesListenerClosure: ((SpaceRoomListSpaceListener) -> TaskHandle)?
|
||||
|
||||
open override func subscribeToSpaceUpdates(listener: SpaceRoomListSpaceListener) -> TaskHandle {
|
||||
subscribeToSpaceUpdatesListenerCallsCount += 1
|
||||
subscribeToSpaceUpdatesListenerReceivedListener = listener
|
||||
DispatchQueue.main.async {
|
||||
self.subscribeToSpaceUpdatesListenerReceivedInvocations.append(listener)
|
||||
}
|
||||
if let subscribeToSpaceUpdatesListenerClosure = subscribeToSpaceUpdatesListenerClosure {
|
||||
return subscribeToSpaceUpdatesListenerClosure(listener)
|
||||
} else {
|
||||
return subscribeToSpaceUpdatesListenerReturnValue
|
||||
}
|
||||
}
|
||||
}
|
||||
open class SpaceServiceSDKMock: MatrixRustSDK.SpaceService, @unchecked Sendable {
|
||||
init() {
|
||||
|
||||
@@ -77,7 +77,7 @@ struct RoomEventStringBuilder {
|
||||
.map(AttributedString.init)
|
||||
case .callInvite:
|
||||
return prefix(L10n.commonUnsupportedCall, with: displayName, isOutgoing: isOutgoing)
|
||||
case .callNotify:
|
||||
case .rtcNotification:
|
||||
return prefix(L10n.commonCallStarted, with: displayName, isOutgoing: isOutgoing)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
isOutgoing: isOutgoing)
|
||||
case .callInvite:
|
||||
return buildCallInviteTimelineItem(for: eventItemProxy)
|
||||
case .callNotify:
|
||||
case .rtcNotification:
|
||||
return buildCallNotificationTimelineItem(for: eventItemProxy)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ struct NotificationContentBuilder {
|
||||
notificationContent.body = L10n.commonPollSummary(question)
|
||||
case .callInvite:
|
||||
notificationContent.body = L10n.commonUnsupportedCall
|
||||
case .callNotify:
|
||||
case .rtcNotification:
|
||||
notificationContent.body = L10n.notificationIncomingCall
|
||||
default:
|
||||
processEmpty(¬ificationContent)
|
||||
|
||||
@@ -124,8 +124,8 @@ class NotificationHandler {
|
||||
}
|
||||
|
||||
return .processedShouldDiscard
|
||||
case .callNotify(let notifyType):
|
||||
return await handleCallNotification(notifyType: notifyType,
|
||||
case .rtcNotification(let notificationType, _):
|
||||
return await handleCallNotification(notificationType: notificationType,
|
||||
rtcNotifyEventID: event.eventId(),
|
||||
timestamp: event.timestamp(),
|
||||
roomID: itemProxy.roomID,
|
||||
@@ -153,7 +153,7 @@ class NotificationHandler {
|
||||
|
||||
/// Handle incoming call notifications.
|
||||
/// - Returns: A boolean indicating whether the notification was handled and should now be discarded.
|
||||
private func handleCallNotification(notifyType: NotifyType,
|
||||
private func handleCallNotification(notificationType: RtcNotificationType,
|
||||
rtcNotifyEventID: String,
|
||||
timestamp: Timestamp,
|
||||
roomID: String,
|
||||
@@ -170,7 +170,7 @@ class NotificationHandler {
|
||||
// - the main app picks this up in `PKPushRegistry.didReceiveIncomingPushWith` and
|
||||
// `CXProvider.reportNewIncomingCall` to show the system UI and handle actions on it.
|
||||
// N.B. this flow works properly only when background processing capabilities are enabled
|
||||
guard notifyType == .ring else {
|
||||
guard notificationType == .ring else {
|
||||
MXLog.info("Non-ringing call notification, handling as push notification")
|
||||
return .shouldDisplay
|
||||
}
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ packages:
|
||||
# Element/Matrix dependencies
|
||||
MatrixRustSDK:
|
||||
url: https://github.com/element-hq/matrix-rust-components-swift
|
||||
exactVersion: 25.09.15
|
||||
exactVersion: 25.09.17-2
|
||||
# path: ../matrix-rust-sdk
|
||||
Compound:
|
||||
url: https://github.com/element-hq/compound-ios
|
||||
|
||||
Reference in New Issue
Block a user