mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-07 07:32:18 +01:00
Merge pull request #930 from correia/bug-921
Only enable "Open in Browser" when a single article is selected.
This commit is contained in:
commit
fabea36a91
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user