Remove unused AddFeedType.

This commit is contained in:
Brent Simmons 2024-06-10 22:18:49 -07:00
parent c1f6026495
commit 7fe5f94262
2 changed files with 1 additions and 20 deletions

View File

@ -18,7 +18,6 @@ protocol AddFeedFolderViewControllerDelegate {
final class AddFeedFolderViewController: UITableViewController {
var delegate: AddFeedFolderViewControllerDelegate?
var addFeedType = AddFeedType.web
var initialContainer: Container?
var containers = [Container]()
@ -26,14 +25,7 @@ final class AddFeedFolderViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
var sortedActiveAccounts: [Account]
if addFeedType == .web {
sortedActiveAccounts = AccountManager.shared.sortedActiveAccounts
} else {
sortedActiveAccounts = AccountManager.shared.sortedActiveAccounts.filter { $0.accountType == .onMyMac || $0.accountType == .cloudKit }
}
for account in sortedActiveAccounts {
for account in AccountManager.shared.sortedActiveAccounts {
containers.append(account)
if let sortedFolders = account.sortedFolders {
containers.append(contentsOf: sortedFolders)

View File

@ -13,10 +13,6 @@ import Parser
import Core
import CommonErrors
enum AddFeedType {
case web
}
final class AddFeedViewController: UITableViewController {
@IBOutlet weak var activityIndicator: UIActivityIndicatorView!
@ -30,7 +26,6 @@ final class AddFeedViewController: UITableViewController {
private var folderLabel = ""
private var userCancelled = false
var addFeedType = AddFeedType.web
var initialFeed: String?
var initialFeedName: String?
@ -39,11 +34,6 @@ final class AddFeedViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
switch addFeedType {
default:
break
}
activityIndicator.isHidden = true
activityIndicator.color = .label
@ -155,7 +145,6 @@ final class AddFeedViewController: UITableViewController {
navController.modalPresentationStyle = .currentContext
let folderViewController = navController.topViewController as! AddFeedFolderViewController
folderViewController.delegate = self
folderViewController.addFeedType = addFeedType
folderViewController.initialContainer = container
present(navController, animated: true)
}