Adds an account behavior to disable folders

Some sync services (Feed Wrangler) don't support folders. This behavior removes the account from the UI when adding new folders.
This commit is contained in:
Jonathan Bennett committed 2020-05-07 10:03:04 -04:00
1 parent 2324d652cd
commit a37bfd5d74
4 files changed
+14 -3

No files matched your search

@@ -42,7 +42,11 @@ class AddFolderWindowController : NSWindowController {
let menu = NSMenu()
accountPopupButton.menu = menu
for oneAccount in AccountManager.shared.sortedActiveAccounts {
let accounts = AccountManager.shared
.sortedActiveAccounts
.filter { !$0.behaviors.contains(.disallowFolderManagement) }
for oneAccount in accounts {
let oneMenuItem = NSMenuItem()
oneMenuItem.title = oneAccount.nameForDisplay