Move menu validations to the app delegate.

This commit is contained in:
Maurice Parker
2019-05-19 10:21:42 -05:00
parent d42398b028
commit 86578775e0
3 changed files with 1 additions and 25 deletions

View File

@@ -228,14 +228,6 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
return true
}
if item.action == #selector(showAddFeedWindow(_:)) {
return canAddNewFeed()
}
if item.action == #selector(showAddFolderWindow(_:)) {
return canAddNewFolder()
}
return true
}
@@ -600,14 +592,6 @@ private extension MainWindowController {
return currentTimelineViewController?.canMarkAllAsRead() ?? false
}
func canAddNewFeed() -> Bool {
return sidebarViewController?.canAddNewFeed() ?? false
}
func canAddNewFolder() -> Bool {
return sidebarViewController?.canAddNewFolder() ?? false
}
func validateToggleRead(_ item: NSValidatedUserInterfaceItem) -> Bool {
let validationStatus = currentTimelineViewController?.markReadCommandStatus() ?? .canDoNothing