Reorder the TimelineController send methods

This commit is contained in:
Stefan Ceriu
2025-07-22 14:16:40 +03:00
committed by Stefan Ceriu
parent cedb2936d0
commit a4c0b7f91c
3 changed files with 101 additions and 97 deletions
@@ -108,19 +108,6 @@ class MockTimelineController: TimelineControllerProtocol {
func processItemAppearance(_ itemID: TimelineItemIdentifier) async { }
func processItemDisappearance(_ itemID: TimelineItemIdentifier) async { }
func sendMessage(_ message: String,
html: String?,
inReplyToEventID: String?,
intentionalMentions: IntentionalMentions) async { }
func sendVoiceMessage(url: URL, audioInfo: AudioInfo, waveform: [UInt16]) async -> Result<Void, TimelineProxyError> {
if let timelineProxy {
return await timelineProxy.sendVoiceMessage(url: url, audioInfo: audioInfo, waveform: waveform) { _ in }
}
return .success(())
}
func toggleReaction(_ reaction: String, to eventID: TimelineItemIdentifier.EventOrTransactionID) async { }
@@ -161,6 +148,21 @@ class MockTimelineController: TimelineControllerProtocol {
timelineItemsTimestamp[itemID] ?? .now
}
// MARK: - Sending
func sendMessage(_ message: String,
html: String?,
inReplyToEventID: String?,
intentionalMentions: IntentionalMentions) async { }
func sendVoiceMessage(url: URL, audioInfo: AudioInfo, waveform: [UInt16]) async -> Result<Void, TimelineProxyError> {
if let timelineProxy {
return await timelineProxy.sendVoiceMessage(url: url, audioInfo: audioInfo, waveform: waveform) { _ in }
}
return .success(())
}
// MARK: - UI Test signalling
/// The cancellable used for UI Tests signalling.