// // AnnouncementsHostingController.swift // Tusker // // Created by Shadowfacts on 4/17/24. // Copyright © 2024 Shadowfacts. All rights reserved. // import SwiftUI import Pachyderm class AnnouncementsHostingController: UIHostingController { private let mastodonController: MastodonController init(announcements: AnnouncementsCollection, mastodonController: MastodonController) { self.mastodonController = mastodonController @Box var boxedSelf: TuskerNavigationDelegate? super.init(rootView: AnnouncementsView(announcements: announcements, mastodonController: mastodonController, navigationDelegate: _boxedSelf)) boxedSelf = self navigationItem.title = "Announcements" } @MainActor required dynamic init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } } extension AnnouncementsHostingController: TuskerNavigationDelegate { nonisolated var apiController: MastodonController! { mastodonController } }