Remove showAddFolderWindow and showAddFeedWindow functions from MainWindowController so that validations will run on AppDelegate.
This commit is contained in:
parent
0f35137216
commit
07ac60cec3
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue