mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Refactor theTimelineItemIdentifier handling; stop relying on optional EventOrTransactionIds and be explicit when setting composer modes from the draft service.
This commit is contained in:
@@ -38,7 +38,8 @@ protocol TimelineProxyProtocol {
|
||||
func paginateBackwards(requestSize: UInt16) async -> Result<Void, TimelineProxyError>
|
||||
func paginateForwards(requestSize: UInt16) async -> Result<Void, TimelineProxyError>
|
||||
|
||||
func edit(_ timelineItem: EventTimelineItem, newContent: RoomMessageEventContentWithoutRelation) async -> Result<Void, TimelineProxyError>
|
||||
func edit(_ eventOrTransactionID: EventOrTransactionId,
|
||||
newContent: RoomMessageEventContentWithoutRelation) async -> Result<Void, TimelineProxyError>
|
||||
|
||||
func redact(_ timelineItemID: TimelineItemIdentifier,
|
||||
reason: String?) async -> Result<Void, TimelineProxyError>
|
||||
@@ -89,12 +90,11 @@ protocol TimelineProxyProtocol {
|
||||
|
||||
func sendMessage(_ message: String,
|
||||
html: String?,
|
||||
inReplyTo eventID: String?,
|
||||
inReplyToEventID: String?,
|
||||
intentionalMentions: IntentionalMentions) async -> Result<Void, TimelineProxyError>
|
||||
|
||||
func toggleReaction(_ reaction: String, to itemID: TimelineItemIdentifier) async -> Result<Void, TimelineProxyError>
|
||||
|
||||
// Polls
|
||||
func createPoll(question: String, answers: [String], pollKind: Poll.Kind) async -> Result<Void, TimelineProxyError>
|
||||
|
||||
func editPoll(original eventID: String,
|
||||
@@ -112,14 +112,3 @@ protocol TimelineProxyProtocol {
|
||||
html: String?,
|
||||
intentionalMentions: Mentions) -> RoomMessageEventContentWithoutRelation
|
||||
}
|
||||
|
||||
extension TimelineProxyProtocol {
|
||||
func sendMessage(_ message: String,
|
||||
html: String?,
|
||||
intentionalMentions: IntentionalMentions) async -> Result<Void, TimelineProxyError> {
|
||||
await sendMessage(message,
|
||||
html: html,
|
||||
inReplyTo: nil,
|
||||
intentionalMentions: intentionalMentions)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user