Event Permalink Tweaks (#2754)

* Handle errors focussing the timeline.

* Add a test for focussing on an existing timeline item.
This commit is contained in:
Doug
2024-04-29 10:00:41 +01:00
committed by GitHub
parent 231fc6defb
commit 7b2168a540
12 changed files with 100 additions and 8 deletions
@@ -66,8 +66,12 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
activeTimeline = timeline
activeTimelineProvider = timeline.timelineProvider
return .success(())
case .failure:
return .failure(.generic)
case .failure(let error):
if case .eventNotFound = error {
return .failure(.eventNotFound)
} else {
return .failure(.generic)
}
}
}
@@ -32,6 +32,7 @@ enum RoomTimelineControllerAction {
enum RoomTimelineControllerError: Error {
case generic
case eventNotFound
}
@MainActor