Adopt the changes introduced in matrix-org/matrix-rust-sdk/pull/4159

This commit is contained in:
Stefan Ceriu
2024-10-22 17:07:33 +03:00
parent a4ea552a83
commit 8f9f8cbed0
9 changed files with 186 additions and 251 deletions
+1 -1
View File
@@ -7822,7 +7822,7 @@
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift"; repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
requirement = { requirement = {
kind = exactVersion; kind = exactVersion;
version = 1.0.59; version = 1.0.60;
}; };
}; };
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
@@ -149,8 +149,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/element-hq/matrix-rust-components-swift", "location" : "https://github.com/element-hq/matrix-rust-components-swift",
"state" : { "state" : {
"revision" : "acd36f68f107f608c33b4d5b46be4ddea5537b1f", "revision" : "dc3a2199b0e87824ccf06d1207487d2e49c5e584",
"version" : "1.0.59" "version" : "1.0.60"
} }
}, },
{ {
@@ -16007,16 +16007,16 @@ open class RoomListServiceSDKMock: MatrixRustSDK.RoomListService {
//MARK: - subscribeToRooms //MARK: - subscribeToRooms
open var subscribeToRoomsRoomIdsSettingsThrowableError: Error? open var subscribeToRoomsRoomIdsThrowableError: Error?
var subscribeToRoomsRoomIdsSettingsUnderlyingCallsCount = 0 var subscribeToRoomsRoomIdsUnderlyingCallsCount = 0
open var subscribeToRoomsRoomIdsSettingsCallsCount: Int { open var subscribeToRoomsRoomIdsCallsCount: Int {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return subscribeToRoomsRoomIdsSettingsUnderlyingCallsCount return subscribeToRoomsRoomIdsUnderlyingCallsCount
} else { } else {
var returnValue: Int? = nil var returnValue: Int? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = subscribeToRoomsRoomIdsSettingsUnderlyingCallsCount returnValue = subscribeToRoomsRoomIdsUnderlyingCallsCount
} }
return returnValue! return returnValue!
@@ -16024,31 +16024,31 @@ open class RoomListServiceSDKMock: MatrixRustSDK.RoomListService {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
subscribeToRoomsRoomIdsSettingsUnderlyingCallsCount = newValue subscribeToRoomsRoomIdsUnderlyingCallsCount = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
subscribeToRoomsRoomIdsSettingsUnderlyingCallsCount = newValue subscribeToRoomsRoomIdsUnderlyingCallsCount = newValue
} }
} }
} }
} }
open var subscribeToRoomsRoomIdsSettingsCalled: Bool { open var subscribeToRoomsRoomIdsCalled: Bool {
return subscribeToRoomsRoomIdsSettingsCallsCount > 0 return subscribeToRoomsRoomIdsCallsCount > 0
} }
open var subscribeToRoomsRoomIdsSettingsReceivedArguments: (roomIds: [String], settings: RoomSubscription?)? open var subscribeToRoomsRoomIdsReceivedRoomIds: [String]?
open var subscribeToRoomsRoomIdsSettingsReceivedInvocations: [(roomIds: [String], settings: RoomSubscription?)] = [] open var subscribeToRoomsRoomIdsReceivedInvocations: [[String]] = []
open var subscribeToRoomsRoomIdsSettingsClosure: (([String], RoomSubscription?) throws -> Void)? open var subscribeToRoomsRoomIdsClosure: (([String]) throws -> Void)?
open override func subscribeToRooms(roomIds: [String], settings: RoomSubscription?) throws { open override func subscribeToRooms(roomIds: [String]) throws {
if let error = subscribeToRoomsRoomIdsSettingsThrowableError { if let error = subscribeToRoomsRoomIdsThrowableError {
throw error throw error
} }
subscribeToRoomsRoomIdsSettingsCallsCount += 1 subscribeToRoomsRoomIdsCallsCount += 1
subscribeToRoomsRoomIdsSettingsReceivedArguments = (roomIds: roomIds, settings: settings) subscribeToRoomsRoomIdsReceivedRoomIds = roomIds
DispatchQueue.main.async { DispatchQueue.main.async {
self.subscribeToRoomsRoomIdsSettingsReceivedInvocations.append((roomIds: roomIds, settings: settings)) self.subscribeToRoomsRoomIdsReceivedInvocations.append(roomIds)
} }
try subscribeToRoomsRoomIdsSettingsClosure?(roomIds, settings) try subscribeToRoomsRoomIdsClosure?(roomIds)
} }
//MARK: - syncIndicator //MARK: - syncIndicator
@@ -18334,81 +18334,6 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
} }
//MARK: - getEventTimelineItemByTransactionId
open var getEventTimelineItemByTransactionIdTransactionIdThrowableError: Error?
var getEventTimelineItemByTransactionIdTransactionIdUnderlyingCallsCount = 0
open var getEventTimelineItemByTransactionIdTransactionIdCallsCount: Int {
get {
if Thread.isMainThread {
return getEventTimelineItemByTransactionIdTransactionIdUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = getEventTimelineItemByTransactionIdTransactionIdUnderlyingCallsCount
}
return returnValue!
}
}
set {
if Thread.isMainThread {
getEventTimelineItemByTransactionIdTransactionIdUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
getEventTimelineItemByTransactionIdTransactionIdUnderlyingCallsCount = newValue
}
}
}
}
open var getEventTimelineItemByTransactionIdTransactionIdCalled: Bool {
return getEventTimelineItemByTransactionIdTransactionIdCallsCount > 0
}
open var getEventTimelineItemByTransactionIdTransactionIdReceivedTransactionId: String?
open var getEventTimelineItemByTransactionIdTransactionIdReceivedInvocations: [String] = []
var getEventTimelineItemByTransactionIdTransactionIdUnderlyingReturnValue: EventTimelineItem!
open var getEventTimelineItemByTransactionIdTransactionIdReturnValue: EventTimelineItem! {
get {
if Thread.isMainThread {
return getEventTimelineItemByTransactionIdTransactionIdUnderlyingReturnValue
} else {
var returnValue: EventTimelineItem? = nil
DispatchQueue.main.sync {
returnValue = getEventTimelineItemByTransactionIdTransactionIdUnderlyingReturnValue
}
return returnValue!
}
}
set {
if Thread.isMainThread {
getEventTimelineItemByTransactionIdTransactionIdUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
getEventTimelineItemByTransactionIdTransactionIdUnderlyingReturnValue = newValue
}
}
}
}
open var getEventTimelineItemByTransactionIdTransactionIdClosure: ((String) async throws -> EventTimelineItem)?
open override func getEventTimelineItemByTransactionId(transactionId: String) async throws -> EventTimelineItem {
if let error = getEventTimelineItemByTransactionIdTransactionIdThrowableError {
throw error
}
getEventTimelineItemByTransactionIdTransactionIdCallsCount += 1
getEventTimelineItemByTransactionIdTransactionIdReceivedTransactionId = transactionId
DispatchQueue.main.async {
self.getEventTimelineItemByTransactionIdTransactionIdReceivedInvocations.append(transactionId)
}
if let getEventTimelineItemByTransactionIdTransactionIdClosure = getEventTimelineItemByTransactionIdTransactionIdClosure {
return try await getEventTimelineItemByTransactionIdTransactionIdClosure(transactionId)
} else {
return getEventTimelineItemByTransactionIdTransactionIdReturnValue
}
}
//MARK: - loadReplyDetails //MARK: - loadReplyDetails
open var loadReplyDetailsEventIdStrThrowableError: Error? open var loadReplyDetailsEventIdStrThrowableError: Error?
@@ -18845,15 +18770,15 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
//MARK: - sendAudio //MARK: - sendAudio
var sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = 0 var sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = 0
open var sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherCallsCount: Int { open var sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount: Int {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount return sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount
} else { } else {
var returnValue: Int? = nil var returnValue: Int? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount returnValue = sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount
} }
return returnValue! return returnValue!
@@ -18861,29 +18786,29 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = newValue sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = newValue sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = newValue
} }
} }
} }
} }
open var sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherCalled: Bool { open var sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCalled: Bool {
return sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherCallsCount > 0 return sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount > 0
} }
open var sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherReceivedArguments: (url: String, audioInfo: AudioInfo, caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?)? open var sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedArguments: (url: String, audioInfo: AudioInfo, caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?)?
open var sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherReceivedInvocations: [(url: String, audioInfo: AudioInfo, caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?)] = [] open var sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedInvocations: [(url: String, audioInfo: AudioInfo, caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?)] = []
var sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue: SendAttachmentJoinHandle! var sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue: SendAttachmentJoinHandle!
open var sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherReturnValue: SendAttachmentJoinHandle! { open var sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReturnValue: SendAttachmentJoinHandle! {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue return sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue
} else { } else {
var returnValue: SendAttachmentJoinHandle? = nil var returnValue: SendAttachmentJoinHandle? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue returnValue = sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue
} }
return returnValue! return returnValue!
@@ -18891,40 +18816,40 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue = newValue sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue = newValue sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue = newValue
} }
} }
} }
} }
open var sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherClosure: ((String, AudioInfo, String?, FormattedBody?, ProgressWatcher?) -> SendAttachmentJoinHandle)? open var sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure: ((String, AudioInfo, String?, FormattedBody?, Bool, ProgressWatcher?) -> SendAttachmentJoinHandle)?
open override func sendAudio(url: String, audioInfo: AudioInfo, caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle { open override func sendAudio(url: String, audioInfo: AudioInfo, caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle {
sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherCallsCount += 1 sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount += 1
sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherReceivedArguments = (url: url, audioInfo: audioInfo, caption: caption, formattedCaption: formattedCaption, progressWatcher: progressWatcher) sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedArguments = (url: url, audioInfo: audioInfo, caption: caption, formattedCaption: formattedCaption, storeInCache: storeInCache, progressWatcher: progressWatcher)
DispatchQueue.main.async { DispatchQueue.main.async {
self.sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherReceivedInvocations.append((url: url, audioInfo: audioInfo, caption: caption, formattedCaption: formattedCaption, progressWatcher: progressWatcher)) self.sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedInvocations.append((url: url, audioInfo: audioInfo, caption: caption, formattedCaption: formattedCaption, storeInCache: storeInCache, progressWatcher: progressWatcher))
} }
if let sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherClosure = sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherClosure { if let sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure = sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure {
return sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherClosure(url, audioInfo, caption, formattedCaption, progressWatcher) return sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure(url, audioInfo, caption, formattedCaption, storeInCache, progressWatcher)
} else { } else {
return sendAudioUrlAudioInfoCaptionFormattedCaptionProgressWatcherReturnValue return sendAudioUrlAudioInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReturnValue
} }
} }
//MARK: - sendFile //MARK: - sendFile
var sendFileUrlFileInfoProgressWatcherUnderlyingCallsCount = 0 var sendFileUrlFileInfoStoreInCacheProgressWatcherUnderlyingCallsCount = 0
open var sendFileUrlFileInfoProgressWatcherCallsCount: Int { open var sendFileUrlFileInfoStoreInCacheProgressWatcherCallsCount: Int {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return sendFileUrlFileInfoProgressWatcherUnderlyingCallsCount return sendFileUrlFileInfoStoreInCacheProgressWatcherUnderlyingCallsCount
} else { } else {
var returnValue: Int? = nil var returnValue: Int? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = sendFileUrlFileInfoProgressWatcherUnderlyingCallsCount returnValue = sendFileUrlFileInfoStoreInCacheProgressWatcherUnderlyingCallsCount
} }
return returnValue! return returnValue!
@@ -18932,29 +18857,29 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
sendFileUrlFileInfoProgressWatcherUnderlyingCallsCount = newValue sendFileUrlFileInfoStoreInCacheProgressWatcherUnderlyingCallsCount = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
sendFileUrlFileInfoProgressWatcherUnderlyingCallsCount = newValue sendFileUrlFileInfoStoreInCacheProgressWatcherUnderlyingCallsCount = newValue
} }
} }
} }
} }
open var sendFileUrlFileInfoProgressWatcherCalled: Bool { open var sendFileUrlFileInfoStoreInCacheProgressWatcherCalled: Bool {
return sendFileUrlFileInfoProgressWatcherCallsCount > 0 return sendFileUrlFileInfoStoreInCacheProgressWatcherCallsCount > 0
} }
open var sendFileUrlFileInfoProgressWatcherReceivedArguments: (url: String, fileInfo: FileInfo, progressWatcher: ProgressWatcher?)? open var sendFileUrlFileInfoStoreInCacheProgressWatcherReceivedArguments: (url: String, fileInfo: FileInfo, storeInCache: Bool, progressWatcher: ProgressWatcher?)?
open var sendFileUrlFileInfoProgressWatcherReceivedInvocations: [(url: String, fileInfo: FileInfo, progressWatcher: ProgressWatcher?)] = [] open var sendFileUrlFileInfoStoreInCacheProgressWatcherReceivedInvocations: [(url: String, fileInfo: FileInfo, storeInCache: Bool, progressWatcher: ProgressWatcher?)] = []
var sendFileUrlFileInfoProgressWatcherUnderlyingReturnValue: SendAttachmentJoinHandle! var sendFileUrlFileInfoStoreInCacheProgressWatcherUnderlyingReturnValue: SendAttachmentJoinHandle!
open var sendFileUrlFileInfoProgressWatcherReturnValue: SendAttachmentJoinHandle! { open var sendFileUrlFileInfoStoreInCacheProgressWatcherReturnValue: SendAttachmentJoinHandle! {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return sendFileUrlFileInfoProgressWatcherUnderlyingReturnValue return sendFileUrlFileInfoStoreInCacheProgressWatcherUnderlyingReturnValue
} else { } else {
var returnValue: SendAttachmentJoinHandle? = nil var returnValue: SendAttachmentJoinHandle? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = sendFileUrlFileInfoProgressWatcherUnderlyingReturnValue returnValue = sendFileUrlFileInfoStoreInCacheProgressWatcherUnderlyingReturnValue
} }
return returnValue! return returnValue!
@@ -18962,40 +18887,40 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
sendFileUrlFileInfoProgressWatcherUnderlyingReturnValue = newValue sendFileUrlFileInfoStoreInCacheProgressWatcherUnderlyingReturnValue = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
sendFileUrlFileInfoProgressWatcherUnderlyingReturnValue = newValue sendFileUrlFileInfoStoreInCacheProgressWatcherUnderlyingReturnValue = newValue
} }
} }
} }
} }
open var sendFileUrlFileInfoProgressWatcherClosure: ((String, FileInfo, ProgressWatcher?) -> SendAttachmentJoinHandle)? open var sendFileUrlFileInfoStoreInCacheProgressWatcherClosure: ((String, FileInfo, Bool, ProgressWatcher?) -> SendAttachmentJoinHandle)?
open override func sendFile(url: String, fileInfo: FileInfo, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle { open override func sendFile(url: String, fileInfo: FileInfo, storeInCache: Bool, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle {
sendFileUrlFileInfoProgressWatcherCallsCount += 1 sendFileUrlFileInfoStoreInCacheProgressWatcherCallsCount += 1
sendFileUrlFileInfoProgressWatcherReceivedArguments = (url: url, fileInfo: fileInfo, progressWatcher: progressWatcher) sendFileUrlFileInfoStoreInCacheProgressWatcherReceivedArguments = (url: url, fileInfo: fileInfo, storeInCache: storeInCache, progressWatcher: progressWatcher)
DispatchQueue.main.async { DispatchQueue.main.async {
self.sendFileUrlFileInfoProgressWatcherReceivedInvocations.append((url: url, fileInfo: fileInfo, progressWatcher: progressWatcher)) self.sendFileUrlFileInfoStoreInCacheProgressWatcherReceivedInvocations.append((url: url, fileInfo: fileInfo, storeInCache: storeInCache, progressWatcher: progressWatcher))
} }
if let sendFileUrlFileInfoProgressWatcherClosure = sendFileUrlFileInfoProgressWatcherClosure { if let sendFileUrlFileInfoStoreInCacheProgressWatcherClosure = sendFileUrlFileInfoStoreInCacheProgressWatcherClosure {
return sendFileUrlFileInfoProgressWatcherClosure(url, fileInfo, progressWatcher) return sendFileUrlFileInfoStoreInCacheProgressWatcherClosure(url, fileInfo, storeInCache, progressWatcher)
} else { } else {
return sendFileUrlFileInfoProgressWatcherReturnValue return sendFileUrlFileInfoStoreInCacheProgressWatcherReturnValue
} }
} }
//MARK: - sendImage //MARK: - sendImage
var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = 0 var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = 0
open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherCallsCount: Int { open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount: Int {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount return sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount
} else { } else {
var returnValue: Int? = nil var returnValue: Int? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount returnValue = sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount
} }
return returnValue! return returnValue!
@@ -19003,29 +18928,29 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = newValue sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = newValue sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = newValue
} }
} }
} }
} }
open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherCalled: Bool { open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCalled: Bool {
return sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherCallsCount > 0 return sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount > 0
} }
open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherReceivedArguments: (url: String, thumbnailUrl: String?, imageInfo: ImageInfo, caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?)? open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedArguments: (url: String, thumbnailUrl: String?, imageInfo: ImageInfo, caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?)?
open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherReceivedInvocations: [(url: String, thumbnailUrl: String?, imageInfo: ImageInfo, caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?)] = [] open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedInvocations: [(url: String, thumbnailUrl: String?, imageInfo: ImageInfo, caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?)] = []
var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue: SendAttachmentJoinHandle! var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue: SendAttachmentJoinHandle!
open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherReturnValue: SendAttachmentJoinHandle! { open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReturnValue: SendAttachmentJoinHandle! {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue return sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue
} else { } else {
var returnValue: SendAttachmentJoinHandle? = nil var returnValue: SendAttachmentJoinHandle? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue returnValue = sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue
} }
return returnValue! return returnValue!
@@ -19033,26 +18958,26 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue = newValue sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue = newValue sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue = newValue
} }
} }
} }
} }
open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherClosure: ((String, String?, ImageInfo, String?, FormattedBody?, ProgressWatcher?) -> SendAttachmentJoinHandle)? open var sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure: ((String, String?, ImageInfo, String?, FormattedBody?, Bool, ProgressWatcher?) -> SendAttachmentJoinHandle)?
open override func sendImage(url: String, thumbnailUrl: String?, imageInfo: ImageInfo, caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle { open override func sendImage(url: String, thumbnailUrl: String?, imageInfo: ImageInfo, caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle {
sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherCallsCount += 1 sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount += 1
sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherReceivedArguments = (url: url, thumbnailUrl: thumbnailUrl, imageInfo: imageInfo, caption: caption, formattedCaption: formattedCaption, progressWatcher: progressWatcher) sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedArguments = (url: url, thumbnailUrl: thumbnailUrl, imageInfo: imageInfo, caption: caption, formattedCaption: formattedCaption, storeInCache: storeInCache, progressWatcher: progressWatcher)
DispatchQueue.main.async { DispatchQueue.main.async {
self.sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherReceivedInvocations.append((url: url, thumbnailUrl: thumbnailUrl, imageInfo: imageInfo, caption: caption, formattedCaption: formattedCaption, progressWatcher: progressWatcher)) self.sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedInvocations.append((url: url, thumbnailUrl: thumbnailUrl, imageInfo: imageInfo, caption: caption, formattedCaption: formattedCaption, storeInCache: storeInCache, progressWatcher: progressWatcher))
} }
if let sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherClosure = sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherClosure { if let sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure = sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure {
return sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherClosure(url, thumbnailUrl, imageInfo, caption, formattedCaption, progressWatcher) return sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure(url, thumbnailUrl, imageInfo, caption, formattedCaption, storeInCache, progressWatcher)
} else { } else {
return sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionProgressWatcherReturnValue return sendImageUrlThumbnailUrlImageInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReturnValue
} }
} }
@@ -19238,15 +19163,15 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
//MARK: - sendVideo //MARK: - sendVideo
var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = 0 var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = 0
open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherCallsCount: Int { open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount: Int {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount return sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount
} else { } else {
var returnValue: Int? = nil var returnValue: Int? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount returnValue = sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount
} }
return returnValue! return returnValue!
@@ -19254,29 +19179,29 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = newValue sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = newValue sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = newValue
} }
} }
} }
} }
open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherCalled: Bool { open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCalled: Bool {
return sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherCallsCount > 0 return sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount > 0
} }
open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherReceivedArguments: (url: String, thumbnailUrl: String?, videoInfo: VideoInfo, caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?)? open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedArguments: (url: String, thumbnailUrl: String?, videoInfo: VideoInfo, caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?)?
open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherReceivedInvocations: [(url: String, thumbnailUrl: String?, videoInfo: VideoInfo, caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?)] = [] open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedInvocations: [(url: String, thumbnailUrl: String?, videoInfo: VideoInfo, caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?)] = []
var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue: SendAttachmentJoinHandle! var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue: SendAttachmentJoinHandle!
open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherReturnValue: SendAttachmentJoinHandle! { open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReturnValue: SendAttachmentJoinHandle! {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue return sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue
} else { } else {
var returnValue: SendAttachmentJoinHandle? = nil var returnValue: SendAttachmentJoinHandle? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue returnValue = sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue
} }
return returnValue! return returnValue!
@@ -19284,40 +19209,40 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue = newValue sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue = newValue sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue = newValue
} }
} }
} }
} }
open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherClosure: ((String, String?, VideoInfo, String?, FormattedBody?, ProgressWatcher?) -> SendAttachmentJoinHandle)? open var sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure: ((String, String?, VideoInfo, String?, FormattedBody?, Bool, ProgressWatcher?) -> SendAttachmentJoinHandle)?
open override func sendVideo(url: String, thumbnailUrl: String?, videoInfo: VideoInfo, caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle { open override func sendVideo(url: String, thumbnailUrl: String?, videoInfo: VideoInfo, caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle {
sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherCallsCount += 1 sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount += 1
sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherReceivedArguments = (url: url, thumbnailUrl: thumbnailUrl, videoInfo: videoInfo, caption: caption, formattedCaption: formattedCaption, progressWatcher: progressWatcher) sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedArguments = (url: url, thumbnailUrl: thumbnailUrl, videoInfo: videoInfo, caption: caption, formattedCaption: formattedCaption, storeInCache: storeInCache, progressWatcher: progressWatcher)
DispatchQueue.main.async { DispatchQueue.main.async {
self.sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherReceivedInvocations.append((url: url, thumbnailUrl: thumbnailUrl, videoInfo: videoInfo, caption: caption, formattedCaption: formattedCaption, progressWatcher: progressWatcher)) self.sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedInvocations.append((url: url, thumbnailUrl: thumbnailUrl, videoInfo: videoInfo, caption: caption, formattedCaption: formattedCaption, storeInCache: storeInCache, progressWatcher: progressWatcher))
} }
if let sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherClosure = sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherClosure { if let sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure = sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure {
return sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherClosure(url, thumbnailUrl, videoInfo, caption, formattedCaption, progressWatcher) return sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherClosure(url, thumbnailUrl, videoInfo, caption, formattedCaption, storeInCache, progressWatcher)
} else { } else {
return sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionProgressWatcherReturnValue return sendVideoUrlThumbnailUrlVideoInfoCaptionFormattedCaptionStoreInCacheProgressWatcherReturnValue
} }
} }
//MARK: - sendVoiceMessage //MARK: - sendVoiceMessage
var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = 0 var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = 0
open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherCallsCount: Int { open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount: Int {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount return sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount
} else { } else {
var returnValue: Int? = nil var returnValue: Int? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount returnValue = sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount
} }
return returnValue! return returnValue!
@@ -19325,29 +19250,29 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = newValue sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherUnderlyingCallsCount = newValue sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingCallsCount = newValue
} }
} }
} }
} }
open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherCalled: Bool { open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherCalled: Bool {
return sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherCallsCount > 0 return sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount > 0
} }
open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherReceivedArguments: (url: String, audioInfo: AudioInfo, waveform: [UInt16], caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?)? open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedArguments: (url: String, audioInfo: AudioInfo, waveform: [UInt16], caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?)?
open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherReceivedInvocations: [(url: String, audioInfo: AudioInfo, waveform: [UInt16], caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?)] = [] open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedInvocations: [(url: String, audioInfo: AudioInfo, waveform: [UInt16], caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?)] = []
var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue: SendAttachmentJoinHandle! var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue: SendAttachmentJoinHandle!
open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherReturnValue: SendAttachmentJoinHandle! { open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherReturnValue: SendAttachmentJoinHandle! {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue return sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue
} else { } else {
var returnValue: SendAttachmentJoinHandle? = nil var returnValue: SendAttachmentJoinHandle? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue returnValue = sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue
} }
return returnValue! return returnValue!
@@ -19355,26 +19280,26 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue = newValue sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherUnderlyingReturnValue = newValue sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherUnderlyingReturnValue = newValue
} }
} }
} }
} }
open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherClosure: ((String, AudioInfo, [UInt16], String?, FormattedBody?, ProgressWatcher?) -> SendAttachmentJoinHandle)? open var sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherClosure: ((String, AudioInfo, [UInt16], String?, FormattedBody?, Bool, ProgressWatcher?) -> SendAttachmentJoinHandle)?
open override func sendVoiceMessage(url: String, audioInfo: AudioInfo, waveform: [UInt16], caption: String?, formattedCaption: FormattedBody?, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle { open override func sendVoiceMessage(url: String, audioInfo: AudioInfo, waveform: [UInt16], caption: String?, formattedCaption: FormattedBody?, storeInCache: Bool, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle {
sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherCallsCount += 1 sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherCallsCount += 1
sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherReceivedArguments = (url: url, audioInfo: audioInfo, waveform: waveform, caption: caption, formattedCaption: formattedCaption, progressWatcher: progressWatcher) sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedArguments = (url: url, audioInfo: audioInfo, waveform: waveform, caption: caption, formattedCaption: formattedCaption, storeInCache: storeInCache, progressWatcher: progressWatcher)
DispatchQueue.main.async { DispatchQueue.main.async {
self.sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherReceivedInvocations.append((url: url, audioInfo: audioInfo, waveform: waveform, caption: caption, formattedCaption: formattedCaption, progressWatcher: progressWatcher)) self.sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherReceivedInvocations.append((url: url, audioInfo: audioInfo, waveform: waveform, caption: caption, formattedCaption: formattedCaption, storeInCache: storeInCache, progressWatcher: progressWatcher))
} }
if let sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherClosure = sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherClosure { if let sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherClosure = sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherClosure {
return sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherClosure(url, audioInfo, waveform, caption, formattedCaption, progressWatcher) return sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherClosure(url, audioInfo, waveform, caption, formattedCaption, storeInCache, progressWatcher)
} else { } else {
return sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionProgressWatcherReturnValue return sendVoiceMessageUrlAudioInfoWaveformCaptionFormattedCaptionStoreInCacheProgressWatcherReturnValue
} }
} }
@@ -417,7 +417,6 @@ class ClientProxy: ClientProxyProtocol {
func knockRoom(_ roomID: String, message: String?) async -> Result<Void, ClientProxyError> { func knockRoom(_ roomID: String, message: String?) async -> Result<Void, ClientProxyError> {
do { do {
// TODO: It should also include a message but the API for is not available yet
let _ = try await client.knock(roomIdOrAlias: roomID) let _ = try await client.knock(roomIdOrAlias: roomID)
await waitForRoomToSync(roomID: roomID, timeout: .seconds(30)) await waitForRoomToSync(roomID: roomID, timeout: .seconds(30))
return .success(()) return .success(())
@@ -429,7 +428,6 @@ class ClientProxy: ClientProxyProtocol {
func knockRoomAlias(_ roomAlias: String, message: String?) async -> Result<Void, ClientProxyError> { func knockRoomAlias(_ roomAlias: String, message: String?) async -> Result<Void, ClientProxyError> {
do { do {
// TODO: It should also include a message but the API for is not available yet
let room = try await client.knock(roomIdOrAlias: roomAlias) let room = try await client.knock(roomIdOrAlias: roomAlias)
await waitForRoomToSync(roomID: room.id(), timeout: .seconds(30)) await waitForRoomToSync(roomID: room.id(), timeout: .seconds(30))
return .success(()) return .success(())
@@ -39,16 +39,7 @@ enum ClientProxyError: Error {
} }
enum SlidingSyncConstants { enum SlidingSyncConstants {
static let defaultTimelineLimit: UInt32 = 20
static let maximumVisibleRangeSize = 30 static let maximumVisibleRangeSize = 30
static let defaultRequiredState = [
RequiredState(key: "m.room.name", value: ""),
RequiredState(key: "m.room.topic", value: ""),
RequiredState(key: "m.room.avatar", value: ""),
RequiredState(key: "m.room.canonical_alias", value: ""),
RequiredState(key: "m.room.join_rules", value: ""),
RequiredState(key: "m.room.pinned_events", value: "")
]
} }
/// This struct represents the configuration that we are using to register the application through Pusher to Sygnal /// This struct represents the configuration that we are using to register the application through Pusher to Sygnal
@@ -187,11 +187,9 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
} }
subscribedForUpdates = true subscribedForUpdates = true
let settings = RoomSubscription(requiredState: SlidingSyncConstants.defaultRequiredState,
timelineLimit: SlidingSyncConstants.defaultTimelineLimit,
includeHeroes: false) // We don't need heroes here as they're already included in the `all_rooms` list
do { do {
try roomListService.subscribeToRooms(roomIds: [id], settings: settings) try roomListService.subscribeToRooms(roomIds: [id])
} catch { } catch {
MXLog.error("Failed subscribing to room with error: \(error)") MXLog.error("Failed subscribing to room with error: \(error)")
} }
@@ -176,10 +176,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
guard let self else { return } guard let self else { return }
do { do {
try roomListService.subscribeToRooms(roomIds: roomIDs, try roomListService.subscribeToRooms(roomIds: roomIDs)
settings: .init(requiredState: SlidingSyncConstants.defaultRequiredState,
timelineLimit: SlidingSyncConstants.defaultTimelineLimit,
includeHeroes: false))
} catch { } catch {
MXLog.error("Failed subscribing to rooms with error: \(error)") MXLog.error("Failed subscribing to rooms with error: \(error)")
} }
@@ -227,9 +227,14 @@ final class TimelineProxy: TimelineProxyProtocol {
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> { requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
MXLog.info("Sending audio") MXLog.info("Sending audio")
let handle = timeline.sendAudio(url: url.path(percentEncoded: false), audioInfo: audioInfo, caption: nil, formattedCaption: nil, progressWatcher: UploadProgressListener { progress in let handle = timeline.sendAudio(url: url.path(percentEncoded: false),
progressSubject?.send(progress) audioInfo: audioInfo,
}) caption: nil,
formattedCaption: nil,
storeInCache: true,
progressWatcher: UploadProgressListener { progress in
progressSubject?.send(progress)
})
await requestHandle(handle) await requestHandle(handle)
@@ -250,9 +255,12 @@ final class TimelineProxy: TimelineProxyProtocol {
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> { requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
MXLog.info("Sending file") MXLog.info("Sending file")
let handle = timeline.sendFile(url: url.path(percentEncoded: false), fileInfo: fileInfo, progressWatcher: UploadProgressListener { progress in let handle = timeline.sendFile(url: url.path(percentEncoded: false),
progressSubject?.send(progress) fileInfo: fileInfo,
}) storeInCache: true,
progressWatcher: UploadProgressListener { progress in
progressSubject?.send(progress)
})
await requestHandle(handle) await requestHandle(handle)
@@ -274,9 +282,15 @@ final class TimelineProxy: TimelineProxyProtocol {
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> { requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
MXLog.info("Sending image") MXLog.info("Sending image")
let handle = timeline.sendImage(url: url.path(percentEncoded: false), thumbnailUrl: thumbnailURL.path(percentEncoded: false), imageInfo: imageInfo, caption: nil, formattedCaption: nil, progressWatcher: UploadProgressListener { progress in let handle = timeline.sendImage(url: url.path(percentEncoded: false),
progressSubject?.send(progress) thumbnailUrl: thumbnailURL.path(percentEncoded: false),
}) imageInfo: imageInfo,
caption: nil,
formattedCaption: nil,
storeInCache: true,
progressWatcher: UploadProgressListener { progress in
progressSubject?.send(progress)
})
await requestHandle(handle) await requestHandle(handle)
@@ -316,9 +330,15 @@ final class TimelineProxy: TimelineProxyProtocol {
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> { requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
MXLog.info("Sending video") MXLog.info("Sending video")
let handle = timeline.sendVideo(url: url.path(percentEncoded: false), thumbnailUrl: thumbnailURL.path(percentEncoded: false), videoInfo: videoInfo, caption: nil, formattedCaption: nil, progressWatcher: UploadProgressListener { progress in let handle = timeline.sendVideo(url: url.path(percentEncoded: false),
progressSubject?.send(progress) thumbnailUrl: thumbnailURL.path(percentEncoded: false),
}) videoInfo: videoInfo,
caption: nil,
formattedCaption: nil,
storeInCache: true,
progressWatcher: UploadProgressListener { progress in
progressSubject?.send(progress)
})
await requestHandle(handle) await requestHandle(handle)
@@ -340,9 +360,15 @@ final class TimelineProxy: TimelineProxyProtocol {
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> { requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
MXLog.info("Sending voice message") MXLog.info("Sending voice message")
let handle = timeline.sendVoiceMessage(url: url.path(percentEncoded: false), audioInfo: audioInfo, waveform: waveform, caption: nil, formattedCaption: nil, progressWatcher: UploadProgressListener { progress in let handle = timeline.sendVoiceMessage(url: url.path(percentEncoded: false),
progressSubject?.send(progress) audioInfo: audioInfo,
}) waveform: waveform,
caption: nil,
formattedCaption: nil,
storeInCache: true,
progressWatcher: UploadProgressListener { progress in
progressSubject?.send(progress)
})
await requestHandle(handle) await requestHandle(handle)
+1 -1
View File
@@ -60,7 +60,7 @@ packages:
# Element/Matrix dependencies # Element/Matrix dependencies
MatrixRustSDK: MatrixRustSDK:
url: https://github.com/element-hq/matrix-rust-components-swift url: https://github.com/element-hq/matrix-rust-components-swift
exactVersion: 1.0.59 exactVersion: 1.0.60
# path: ../matrix-rust-sdk # path: ../matrix-rust-sdk
Compound: Compound:
url: https://github.com/element-hq/compound-ios url: https://github.com/element-hq/compound-ios