diff --git a/Tusker/Scenes/AuxiliarySceneDelegate.swift b/Tusker/Scenes/AuxiliarySceneDelegate.swift index 7480865f..507c1586 100644 --- a/Tusker/Scenes/AuxiliarySceneDelegate.swift +++ b/Tusker/Scenes/AuxiliarySceneDelegate.swift @@ -106,7 +106,15 @@ class AuxiliarySceneDelegate: UIResponder, UIWindowSceneDelegate, TuskerSceneDel private func timelineViewController(for timeline: Timeline, mastodonController: MastodonController) -> UIViewController { switch timeline { - // todo: list/hashtag controllers need whole objects which must be fetched asynchronously + // todo: hashtag controllers need whole objects which must be fetched asynchronously, and that endpoint only exists in mastodon v4 + case .list(id: let id): + let req = ListMO.fetchRequest(id: id) + if let list = try? mastodonController.persistentContainer.viewContext.fetch(req).first { + return ListTimelineViewController(for: List(id: id, title: list.title), mastodonController: mastodonController) + } else { + return TimelineViewController(for: timeline, mastodonController: mastodonController) + } + default: return TimelineViewController(for: timeline, mastodonController: mastodonController) }