diff --git a/Tusker/TuskerNavigationDelegate.swift b/Tusker/TuskerNavigationDelegate.swift index e96f76abc2..47efa68617 100644 --- a/Tusker/TuskerNavigationDelegate.swift +++ b/Tusker/TuskerNavigationDelegate.swift @@ -10,52 +10,11 @@ import UIKit import SafariServices import Pachyderm -protocol TuskerNavigationDelegate: class { - +protocol TuskerNavigationDelegate: UIViewController { var apiController: MastodonController { get } - - func show(_ vc: UIViewController) - - func selected(account accountID: String) - - func selected(mention: Mention) - - func selected(tag: Hashtag) - - func selected(url: URL) - - func selected(status statusID: String) - - func selected(status statusID: String, state: StatusState) - - func compose() - - func compose(mentioning: String?) - - func reply(to statusID: String) - - func reply(to statusID: String, mentioningAcct: String?) - - func loadingLargeImage(url: URL, cache: ImageCache, description: String?, animatingFrom sourceView: UIImageView) -> LoadingLargeImageViewController - - func showLoadingLargeImage(url: URL, cache: ImageCache, description: String?, animatingFrom sourceView: UIImageView) - - func gallery(attachments: [Attachment], sourceViews: [UIImageView?], startIndex: Int) -> GalleryViewController - - func showGallery(attachments: [Attachment], sourceViews: [UIImageView?], startIndex: Int) - - func showMoreOptions(forStatus statusID: String, sourceView: UIView?) - - func showMoreOptions(forAccount accountID: String, sourceView: UIView?) - - func showMoreOptions(forURL url: URL, sourceView: UIView?) - - func showFollowedByList(accountIDs: [String]) - - func statusActionAccountList(action: StatusActionAccountListTableViewController.ActionType, statusID: String, statusState state: StatusState, accountIDs: [String]?) -> StatusActionAccountListTableViewController } -extension TuskerNavigationDelegate where Self: UIViewController { +extension TuskerNavigationDelegate { func show(_ vc: UIViewController) { if vc is LargeImageViewController || vc is GalleryViewController || vc is SFSafariViewController {