mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-03 18:56:14 +00:00
Don't allow Twitter or Reddit feeds to be added to accounts that can't handle them
This commit is contained in:
1 parent
0835e789e5
commit
c4ad7c71fd
3 files changed
+16
-3
No files matched your search
@@ -17,6 +17,7 @@ protocol AddFeedFolderViewControllerDelegate {
|
||||
class AddFeedFolderViewController: UITableViewController {
|
||||
|
||||
var delegate: AddFeedFolderViewControllerDelegate?
|
||||
var addFeedType = AddFeedType.web
|
||||
var initialContainer: Container?
|
||||
|
||||
var containers = [Container]()
|
||||
@@ -24,7 +25,14 @@ class AddFeedFolderViewController: UITableViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
for account in AccountManager.shared.sortedActiveAccounts {
|
||||
var sortedActiveAccounts: [Account]
|
||||
if addFeedType == .web {
|
||||
sortedActiveAccounts = AccountManager.shared.sortedActiveAccounts
|
||||
} else {
|
||||
sortedActiveAccounts = AccountManager.shared.sortedActiveAccounts.filter { $0.type == .onMyMac || $0.type == .cloudKit }
|
||||
}
|
||||
|
||||
for account in sortedActiveAccounts {
|
||||
containers.append(account)
|
||||
if let sortedFolders = account.sortedFolders {
|
||||
containers.append(contentsOf: sortedFolders)
|
||||
|
||||
Reference in new issue
Block a user