mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-11 17:24:04 +01:00
Disable Add Twitter Feed menu item if no Twitter extension points are available
This commit is contained in:
parent
0369d976fa
commit
8371517c8d
@ -403,6 +403,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
|||||||
if item.action == #selector(showAddWebFeedWindow(_:)) || item.action == #selector(showAddFolderWindow(_:)) {
|
if item.action == #selector(showAddWebFeedWindow(_:)) || item.action == #selector(showAddFolderWindow(_:)) {
|
||||||
return !isDisplayingSheet && !AccountManager.shared.activeAccounts.isEmpty
|
return !isDisplayingSheet && !AccountManager.shared.activeAccounts.isEmpty
|
||||||
}
|
}
|
||||||
|
if item.action == #selector(showAddTwitterFeedWindow(_:)) {
|
||||||
|
return ExtensionPointManager.shared.activeExtensionPoints.values.contains(where: { $0 is TwitterFeedProvider })
|
||||||
|
}
|
||||||
#if !MAC_APP_STORE
|
#if !MAC_APP_STORE
|
||||||
if item.action == #selector(toggleWebInspectorEnabled(_:)) {
|
if item.action == #selector(toggleWebInspectorEnabled(_:)) {
|
||||||
(item as! NSMenuItem).state = AppDefaults.webInspectorEnabled ? .on : .off
|
(item as! NSMenuItem).state = AppDefaults.webInspectorEnabled ? .on : .off
|
||||||
|
Loading…
Reference in New Issue
Block a user