mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Revert "Support sending gallery messages behind a feature flag"
This reverts commit 6a2ed331fa.
This commit is contained in:
@@ -402,16 +402,6 @@ class TimelineController: TimelineControllerProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func sendGallery(itemInfos: [GalleryItemInfo],
|
||||
caption: String?,
|
||||
formattedCaption: String?,
|
||||
inReplyToEventID: String?) async -> Result<Void, TimelineControllerError> {
|
||||
await activeTimeline.sendGallery(itemInfos: itemInfos,
|
||||
caption: caption,
|
||||
formattedCaption: formattedCaption,
|
||||
inReplyToEventID: inReplyToEventID).mapError(TimelineControllerError.timelineProxyError)
|
||||
}
|
||||
|
||||
// MARK: - Polls
|
||||
|
||||
func createPoll(question: String, answers: [String], maxSelections: Int, pollKind: Poll.Kind) async -> Result<Void, TimelineControllerError> {
|
||||
|
||||
@@ -134,11 +134,6 @@ protocol TimelineControllerProtocol: Sendable {
|
||||
waveform: [Float],
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineControllerError>
|
||||
|
||||
func sendGallery(itemInfos: [GalleryItemInfo],
|
||||
caption: String?,
|
||||
formattedCaption: String?,
|
||||
inReplyToEventID: String?) async -> Result<Void, TimelineControllerError>
|
||||
|
||||
// MARK: - Poll
|
||||
|
||||
func createPoll(question: String, answers: [String], maxSelections: Int, pollKind: Poll.Kind) async -> Result<Void, TimelineControllerError>
|
||||
|
||||
@@ -374,30 +374,6 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
return .success(())
|
||||
}
|
||||
|
||||
func sendGallery(itemInfos: [GalleryItemInfo],
|
||||
caption: String?,
|
||||
formattedCaption: String?,
|
||||
inReplyToEventID: String?) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Sending gallery with \(itemInfos.count) items")
|
||||
|
||||
do {
|
||||
let formatted = formattedCaption.map { FormattedBody(format: .html, body: $0) }
|
||||
let params = GalleryUploadParameters(caption: caption,
|
||||
formattedCaption: formatted,
|
||||
mentions: nil,
|
||||
inReplyTo: inReplyToEventID)
|
||||
|
||||
let handle = try timeline.sendGallery(params: params, itemInfos: itemInfos)
|
||||
try await handle.join()
|
||||
MXLog.info("Finished sending gallery")
|
||||
} catch {
|
||||
MXLog.error("Failed sending gallery with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
|
||||
return .success(())
|
||||
}
|
||||
|
||||
func sendVoiceMessage(url: URL,
|
||||
audioInfo: AudioInfo,
|
||||
waveform: [Float],
|
||||
|
||||
@@ -110,11 +110,6 @@ protocol TimelineProxyProtocol: Sendable {
|
||||
waveform: [Float],
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineProxyError>
|
||||
|
||||
func sendGallery(itemInfos: [GalleryItemInfo],
|
||||
caption: String?,
|
||||
formattedCaption: String?,
|
||||
inReplyToEventID: String?) async -> Result<Void, TimelineProxyError>
|
||||
|
||||
func sendReadReceipt(for eventID: String, type: ReceiptType) async -> Result<Void, TimelineProxyError>
|
||||
func markAsRead(receiptType: ReceiptType) async -> Result<Void, TimelineProxyError>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user