Fix list timelines opened in new window not showing Edit button
This commit is contained in:
parent
85765928b4
commit
3394c2126c
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue