mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Update the SDK.
This commit is contained in:
@@ -178,12 +178,8 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
|
||||
func toggleReaction(_ reaction: String, to itemID: TimelineItemIdentifier) async {
|
||||
MXLog.info("Toggle reaction in \(roomID)")
|
||||
guard let eventID = itemID.eventID else {
|
||||
MXLog.error("Failed toggling reaction: missing eventID")
|
||||
return
|
||||
}
|
||||
|
||||
switch await activeTimeline.toggleReaction(reaction, to: eventID) {
|
||||
|
||||
switch await activeTimeline.toggleReaction(reaction, to: itemID) {
|
||||
case .success:
|
||||
MXLog.info("Finished toggling reaction")
|
||||
case .failure(let error):
|
||||
|
||||
@@ -430,15 +430,15 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func toggleReaction(_ reaction: String, to eventID: String) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Toggling reaction for eventID: \(eventID)")
|
||||
func toggleReaction(_ reaction: String, to itemID: TimelineItemIdentifier) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Toggling reaction for event: \(itemID)")
|
||||
|
||||
do {
|
||||
try await timeline.toggleReaction(eventId: eventID, key: reaction)
|
||||
MXLog.info("Finished toggling reaction for eventID: \(eventID)")
|
||||
try await timeline.toggleReaction(uniqueId: itemID.timelineID, key: reaction)
|
||||
MXLog.info("Finished toggling reaction for event: \(itemID)")
|
||||
return .success(())
|
||||
} catch {
|
||||
MXLog.error("Failed toggling reaction for eventID: \(eventID)")
|
||||
MXLog.error("Failed toggling reaction for event: \(itemID)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ protocol TimelineProxyProtocol {
|
||||
inReplyTo eventID: String?,
|
||||
intentionalMentions: IntentionalMentions) async -> Result<Void, TimelineProxyError>
|
||||
|
||||
func toggleReaction(_ reaction: String, to eventID: String) 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>
|
||||
|
||||
Reference in New Issue
Block a user