mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Adopt various rust side Timeline API additions (#3423)
* Adopt new reaction toggling API introduced in matrix-org/matrix-rust-sdk/pull/4127 * Adopt the changes introduced in matrix-org/matrix-rust-sdk/pull/4111: use the new `TimelineUniqueId` type instead of `String` for unique timeline identifiers. * Bump the RustSDK to v1.0.58. * Fix unit tests
This commit is contained in:
@@ -132,8 +132,12 @@ class TimelineInteractionHandler {
|
||||
UIPasteboard.general.url = permalinkURL
|
||||
}
|
||||
case .redact:
|
||||
guard case let .event(_, eventOrTransactionID) = itemID else {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
Task {
|
||||
await timelineController.redact(itemID)
|
||||
await timelineController.redact(eventOrTransactionID)
|
||||
}
|
||||
case .reply:
|
||||
guard let eventID = eventTimelineItem.id.eventID else {
|
||||
@@ -159,7 +163,13 @@ class TimelineInteractionHandler {
|
||||
case .react:
|
||||
displayEmojiPicker(for: itemID)
|
||||
case .toggleReaction(let key):
|
||||
Task { await timelineController.toggleReaction(key, to: itemID) }
|
||||
Task {
|
||||
guard case let .event(_, eventOrTransactionID) = itemID else {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
await timelineController.toggleReaction(key, to: eventOrTransactionID)
|
||||
}
|
||||
case .endPoll(let pollStartID):
|
||||
endPoll(pollStartID: pollStartID)
|
||||
case .pin:
|
||||
|
||||
Reference in New Issue
Block a user