mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Only enable "Open in Browser" when a single article is selected.
Fixes bug #921.
This commit is contained in:
@@ -684,9 +684,15 @@ extension TimelineViewController: NSUserInterfaceValidations {
|
||||
|
||||
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
||||
|
||||
if item.action == #selector(openArticleInBrowser(_:)) {
|
||||
let currentLink = oneSelectedArticle?.preferredLink
|
||||
return currentLink != nil
|
||||
}
|
||||
|
||||
if item.action == #selector(copy(_:)) {
|
||||
return NSPasteboard.general.canCopyAtLeastOneObject(selectedArticles)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user