mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Bump the RustSDK to v25.03.31
- adopt new async throwing methods - use the sdk side TimelineStart virtual timeline item - remove async from `directRoomForUserID` as it's not async on the rust side - remove async from `retryDecryption` as it's spawning not blocking on the rust side
This commit is contained in:
committed by
Stefan Ceriu
parent
5e50823223
commit
901c833c40
@@ -159,15 +159,13 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func retryDecryption(sessionIDs: [String]?) async {
|
||||
func retryDecryption(sessionIDs: [String]?) {
|
||||
let sessionIDs = sessionIDs ?? []
|
||||
|
||||
MXLog.info("Retrying decryption for sessionIDs: \(sessionIDs)")
|
||||
|
||||
await Task.dispatch(on: .global()) { [weak self] in
|
||||
self?.timeline.retryDecryption(sessionIds: sessionIDs)
|
||||
MXLog.info("Finished retrying decryption for sessionID: \(sessionIDs)")
|
||||
}
|
||||
timeline.retryDecryption(sessionIds: sessionIDs)
|
||||
MXLog.info("Finished retrying decryption for sessionID: \(sessionIDs)")
|
||||
}
|
||||
|
||||
func edit(_ eventOrTransactionID: TimelineItemIdentifier.EventOrTransactionID, newContent: EditedContent) async -> Result<Void, TimelineProxyError> {
|
||||
@@ -504,17 +502,15 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
func endPoll(pollStartID: String, text: String) async -> Result<Void, TimelineProxyError> {
|
||||
MXLog.info("Ending poll with eventID: \(pollStartID)")
|
||||
|
||||
return await Task.dispatch(on: .global()) {
|
||||
do {
|
||||
try self.timeline.endPoll(pollStartEventId: pollStartID, text: text)
|
||||
|
||||
MXLog.info("Finished ending poll with eventID: \(pollStartID)")
|
||||
|
||||
return .success(())
|
||||
} catch {
|
||||
MXLog.error("Failed ending poll with eventID: \(pollStartID) with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
do {
|
||||
try await timeline.endPoll(pollStartEventId: pollStartID, text: text)
|
||||
|
||||
MXLog.info("Finished ending poll with eventID: \(pollStartID)")
|
||||
|
||||
return .success(())
|
||||
} catch {
|
||||
MXLog.error("Failed ending poll with eventID: \(pollStartID) with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user