// // UIViewController+StatusTableViewCellDelegate.swift // Tusker // // Created by Shadowfacts on 8/27/18. // Copyright © 2018 Shadowfacts. All rights reserved. // import UIKit import MastodonKit import SafariServices extension UIViewController: StatusTableViewCellDelegate { func selected(account: Account) { guard let navigationController = navigationController else { fatalError("Can't show profile VC when not in navigation controller") } let vc = ProfileTableViewController.create(for: account) navigationController.pushViewController(vc, animated: true) } func selected(mention: Mention) { } func selected(tag: Tag) { } func selected(url: URL) { let vc = SFSafariViewController(url: url) present(vc, animated: true) } func selected(status: Status) { guard let navigationController = navigationController else { fatalError("Can't show conversation VC when not in navigation controller") } let vc = ConversationViewController.create(for: status) navigationController.pushViewController(vc, animated: true) } }