mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
implemented navigation for permalinks to threads
also this handles the case where we are permalinking to non existent (or impossible to fetch) event.
This commit is contained in:
@@ -190,10 +190,10 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func getThreadRootEventID(for eventID: String) async -> Result<String?, RoomProxyError> {
|
||||
func loadOrFetchEvent(for eventID: String) async -> Result<TimelineEvent, RoomProxyError> {
|
||||
do {
|
||||
let event = try await room.loadOrFetchEvent(eventId: eventID)
|
||||
return .success(event.threadRootEventId())
|
||||
return .success(event)
|
||||
} catch {
|
||||
MXLog.error("Failed fetching the event with id: \(eventID) with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
|
||||
@@ -97,7 +97,7 @@ protocol JoinedRoomProxyProtocol: RoomProxyProtocol {
|
||||
|
||||
func threadTimeline(eventID: String) async -> Result<TimelineProxyProtocol, RoomProxyError>
|
||||
|
||||
func getThreadRootEventID(for eventID: String) async -> Result<String?, RoomProxyError>
|
||||
func loadOrFetchEvent(for eventID: String) async -> Result<TimelineEvent, RoomProxyError>
|
||||
|
||||
func messageFilteredTimeline(focus: TimelineFocus,
|
||||
allowedMessageTypes: [TimelineAllowedMessageType],
|
||||
|
||||
Reference in New Issue
Block a user