mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Enable local echoes for media uploads for all builds. (#3579)
* Enable local echoes for media uploads for all builds. * Update a string.
This commit is contained in:
@@ -224,18 +224,15 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
func sendAudio(url: URL,
|
||||
audioInfo: AudioInfo,
|
||||
caption: String?,
|
||||
progressSubject: CurrentValueSubject<Double, Never>?,
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Sending audio")
|
||||
|
||||
let handle = timeline.sendAudio(url: url.path(percentEncoded: false),
|
||||
audioInfo: audioInfo,
|
||||
caption: caption,
|
||||
formattedCaption: nil,
|
||||
progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
},
|
||||
useSendQueue: AppSettings.isDevelopmentBuild)
|
||||
formattedCaption: nil, // Rust will build this from the caption's markdown.
|
||||
progressWatcher: nil,
|
||||
useSendQueue: true)
|
||||
|
||||
await requestHandle(handle)
|
||||
|
||||
@@ -253,18 +250,15 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
func sendFile(url: URL,
|
||||
fileInfo: FileInfo,
|
||||
caption: String?,
|
||||
progressSubject: CurrentValueSubject<Double, Never>?,
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Sending file")
|
||||
|
||||
let handle = timeline.sendFile(url: url.path(percentEncoded: false),
|
||||
fileInfo: fileInfo,
|
||||
caption: caption,
|
||||
formattedCaption: nil,
|
||||
progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
},
|
||||
useSendQueue: AppSettings.isDevelopmentBuild)
|
||||
formattedCaption: nil, // Rust will build this from the caption's markdown.
|
||||
progressWatcher: nil,
|
||||
useSendQueue: true)
|
||||
|
||||
await requestHandle(handle)
|
||||
|
||||
@@ -279,12 +273,10 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
return .success(())
|
||||
}
|
||||
|
||||
// swiftlint:disable:next function_parameter_count
|
||||
func sendImage(url: URL,
|
||||
thumbnailURL: URL,
|
||||
imageInfo: ImageInfo,
|
||||
caption: String?,
|
||||
progressSubject: CurrentValueSubject<Double, Never>?,
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Sending image")
|
||||
|
||||
@@ -292,11 +284,9 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
thumbnailUrl: thumbnailURL.path(percentEncoded: false),
|
||||
imageInfo: imageInfo,
|
||||
caption: caption,
|
||||
formattedCaption: nil,
|
||||
progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
},
|
||||
useSendQueue: AppSettings.isDevelopmentBuild)
|
||||
formattedCaption: nil, // Rust will build this from the caption's markdown.
|
||||
progressWatcher: nil,
|
||||
useSendQueue: true)
|
||||
|
||||
await requestHandle(handle)
|
||||
|
||||
@@ -334,7 +324,6 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
thumbnailURL: URL,
|
||||
videoInfo: VideoInfo,
|
||||
caption: String?,
|
||||
progressSubject: CurrentValueSubject<Double, Never>?,
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Sending video")
|
||||
|
||||
@@ -342,11 +331,9 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
thumbnailUrl: thumbnailURL.path(percentEncoded: false),
|
||||
videoInfo: videoInfo,
|
||||
caption: caption,
|
||||
formattedCaption: nil,
|
||||
progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
},
|
||||
useSendQueue: AppSettings.isDevelopmentBuild)
|
||||
formattedCaption: nil, // Rust will build this from the caption's markdown.
|
||||
progressWatcher: nil,
|
||||
useSendQueue: true)
|
||||
|
||||
await requestHandle(handle)
|
||||
|
||||
@@ -364,7 +351,6 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
func sendVoiceMessage(url: URL,
|
||||
audioInfo: AudioInfo,
|
||||
waveform: [UInt16],
|
||||
progressSubject: CurrentValueSubject<Double, Never>?,
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Sending voice message")
|
||||
|
||||
@@ -373,10 +359,8 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
waveform: waveform,
|
||||
caption: nil,
|
||||
formattedCaption: nil,
|
||||
progressWatcher: UploadProgressListener { progress in
|
||||
progressSubject?.send(progress)
|
||||
},
|
||||
useSendQueue: AppSettings.isDevelopmentBuild)
|
||||
progressWatcher: nil,
|
||||
useSendQueue: true)
|
||||
|
||||
await requestHandle(handle)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user