Continue removing Reddit references.

This commit is contained in:
Brent Simmons
2023-06-30 21:24:18 -07:00
parent a673e6bba7
commit 7c75f62fcf
13 changed files with 4 additions and 735 deletions

View File

@@ -109,10 +109,6 @@ struct AppAssets {
return UIImage(systemName: "chevron.right", withConfiguration: UIImage.SymbolConfiguration(pointSize: size, weight: weight))!
}
static var contextMenuReddit: UIImage = {
return UIImage(named: "contextMenuReddit")!
}()
static var copyImage: UIImage = {
return UIImage(systemName: "doc.on.doc")!
}()
@@ -201,10 +197,6 @@ struct AppAssets {
return UIColor(named: "primaryAccentColor")!
}
static var redditOriginal: UIImage = {
return UIImage(named: "redditWhite")!.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)
}()
static var safariImage: UIImage = {
return UIImage(systemName: "safari")!
}()

View File

@@ -627,29 +627,18 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma
func configureContextMenu(_: Any? = nil) {
/*
Context Menu Order:
1. Add Web Feed
2. Add Reddit Feed
1. Add Feed
3. Add Folder
*/
var menuItems: [UIAction] = []
let addWebFeedActionTitle = NSLocalizedString("button.title.add-web-feed", comment: "Add Web Feed")
let addWebFeedActionTitle = NSLocalizedString("button.title.add-web-feed", comment: "Add Feed")
let addWebFeedAction = UIAction(title: addWebFeedActionTitle, image: AppAssets.plus) { _ in
self.coordinator.showAddWebFeed()
}
menuItems.append(addWebFeedAction)
if AccountManager.shared.activeAccounts.contains(where: { $0.type == .onMyMac || $0.type == .cloudKit }) {
if ExtensionPointManager.shared.isRedditEnabled {
let addRedditFeedActionTitle = NSLocalizedString("button.title.add-reddit-feed", comment: "Add Reddit Feed")
let addRedditFeedAction = UIAction(title: addRedditFeedActionTitle, image: AppAssets.contextMenuReddit.tinted(color: .label)) { _ in
self.coordinator.showAddRedditFeed()
}
menuItems.append(addRedditFeedAction)
}
}
let addWebFolderActionTitle = NSLocalizedString("button.title.add-folder", comment: "Add Folder")
let addWebFolderAction = UIAction(title: addWebFolderActionTitle, image: AppAssets.folderOutlinePlus) { _ in
self.coordinator.showAddFolder()

View File

@@ -1215,13 +1215,6 @@ final class SceneCoordinator: NSObject, UndoableCommandRunner, Logging {
masterFeedViewController.present(addNavViewController, animated: true)
}
func showAddRedditFeed() {
let addNavViewController = UIStoryboard.redditAdd.instantiateInitialViewController() as! UINavigationController
addNavViewController.modalPresentationStyle = .formSheet
addNavViewController.preferredContentSize = AddFeedViewController.preferredContentSizeForFormSheetDisplay
masterFeedViewController.present(addNavViewController, animated: true)
}
func showAddFolder() {
let addNavViewController = UIStoryboard.add.instantiateViewController(withIdentifier: "AddFolderViewControllerNav") as! UINavigationController
addNavViewController.modalPresentationStyle = .formSheet