Remove showAddFolderWindow and showAddFeedWindow functions from MainWindowController so that validations will run on AppDelegate.

This commit is contained in:
Maurice Parker 2019-05-19 15:27:58 -05:00
parent 0f35137216
commit 07ac60cec3
2 changed files with 2 additions and 10 deletions

View File

@ -243,14 +243,6 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
}
}
@IBAction func showAddFolderWindow(_ sender: Any?) {
appDelegate.showAddFolderSheetOnWindow(window!)
}
@IBAction func showAddFeedWindow(_ sender: Any?) {
appDelegate.showAddFeedSheetOnWindow(window!, urlString: nil, name: nil, account: nil, folder: nil)
}
@IBAction func openArticleInBrowser(_ sender: Any?) {
if let link = currentLink {
Browser.open(link)

View File

@ -129,8 +129,8 @@ private extension SidebarViewController {
let menu = NSMenu(title: "")
menu.addItem(withTitle: NSLocalizedString("New Feed", comment: "Command"), action: #selector(MainWindowController.showAddFeedWindow(_:)), keyEquivalent: "")
menu.addItem(withTitle: NSLocalizedString("New Folder", comment: "Command"), action: #selector(MainWindowController.showAddFolderWindow(_:)), keyEquivalent: "")
menu.addItem(withTitle: NSLocalizedString("New Feed", comment: "Command"), action: #selector(AppDelegate.showAddFeedWindow(_:)), keyEquivalent: "")
menu.addItem(withTitle: NSLocalizedString("New Folder", comment: "Command"), action: #selector(AppDelegate.showAddFolderWindow(_:)), keyEquivalent: "")
return menu
}