From af300a3559d04c96e9ef340c33ed234c78a673cf Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 15 Aug 2020 17:47:33 -0400 Subject: [PATCH] Remove unused TuskerNavigationDelegate customization points --- Tusker/TuskerNavigationDelegate.swift | 45 ++------------------------- 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/Tusker/TuskerNavigationDelegate.swift b/Tusker/TuskerNavigationDelegate.swift index e96f76ab..47efa686 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 {