37 lines
869 B
Swift
37 lines
869 B
Swift
//
|
|
// 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)
|
|
}
|
|
|
|
}
|