mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-02 20:16:54 +01:00
Disable adding a new folder if there are no active accounts
This commit is contained in:
parent
5ded56fc28
commit
eb5c1a49f7
@ -232,6 +232,10 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
return canAddNewFeed()
|
||||
}
|
||||
|
||||
if item.action == #selector(showAddFolderWindow(_:)) {
|
||||
return canAddNewFolder()
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@ -600,6 +604,10 @@ private extension MainWindowController {
|
||||
return sidebarViewController?.canAddNewFeed() ?? false
|
||||
}
|
||||
|
||||
func canAddNewFolder() -> Bool {
|
||||
return sidebarViewController?.canAddNewFolder() ?? false
|
||||
}
|
||||
|
||||
func validateToggleRead(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
||||
|
||||
let validationStatus = currentTimelineViewController?.markReadCommandStatus() ?? .canDoNothing
|
||||
|
@ -365,6 +365,10 @@ protocol SidebarDelegate: class {
|
||||
return !accountNodes.isEmpty
|
||||
}
|
||||
|
||||
func canAddNewFolder() -> Bool {
|
||||
return !accountNodes.isEmpty
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - NSUserInterfaceValidations
|
||||
|
Loading…
x
Reference in New Issue
Block a user