mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Adopt the changes introduced in matrix-org/matrix-rust-sdk/pull/4159
This commit is contained in:
@@ -227,9 +227,14 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Sending audio")
|
||||
|
||||
let handle = timeline.sendAudio(url: url.path(percentEncoded: false), audioInfo: audioInfo, caption: nil, formattedCaption: nil, progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
})
|
||||
let handle = timeline.sendAudio(url: url.path(percentEncoded: false),
|
||||
audioInfo: audioInfo,
|
||||
caption: nil,
|
||||
formattedCaption: nil,
|
||||
storeInCache: true,
|
||||
progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
})
|
||||
|
||||
await requestHandle(handle)
|
||||
|
||||
@@ -250,9 +255,12 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Sending file")
|
||||
|
||||
let handle = timeline.sendFile(url: url.path(percentEncoded: false), fileInfo: fileInfo, progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
})
|
||||
let handle = timeline.sendFile(url: url.path(percentEncoded: false),
|
||||
fileInfo: fileInfo,
|
||||
storeInCache: true,
|
||||
progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
})
|
||||
|
||||
await requestHandle(handle)
|
||||
|
||||
@@ -274,9 +282,15 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
|
||||
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
|
||||
progressSubject?.send(progress)
|
||||
})
|
||||
let handle = timeline.sendImage(url: url.path(percentEncoded: false),
|
||||
thumbnailUrl: thumbnailURL.path(percentEncoded: false),
|
||||
imageInfo: imageInfo,
|
||||
caption: nil,
|
||||
formattedCaption: nil,
|
||||
storeInCache: true,
|
||||
progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
})
|
||||
|
||||
await requestHandle(handle)
|
||||
|
||||
@@ -316,9 +330,15 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
|
||||
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
|
||||
progressSubject?.send(progress)
|
||||
})
|
||||
let handle = timeline.sendVideo(url: url.path(percentEncoded: false),
|
||||
thumbnailUrl: thumbnailURL.path(percentEncoded: false),
|
||||
videoInfo: videoInfo,
|
||||
caption: nil,
|
||||
formattedCaption: nil,
|
||||
storeInCache: true,
|
||||
progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
})
|
||||
|
||||
await requestHandle(handle)
|
||||
|
||||
@@ -340,9 +360,15 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
|
||||
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
|
||||
progressSubject?.send(progress)
|
||||
})
|
||||
let handle = timeline.sendVoiceMessage(url: url.path(percentEncoded: false),
|
||||
audioInfo: audioInfo,
|
||||
waveform: waveform,
|
||||
caption: nil,
|
||||
formattedCaption: nil,
|
||||
storeInCache: true,
|
||||
progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
})
|
||||
|
||||
await requestHandle(handle)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user