mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-09 08:39:00 +01:00
Disable the Add Twitter menu item if there are no active accounts
This commit is contained in:
parent
19b01679f0
commit
7420b607ce
@ -404,6 +404,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
|||||||
return !isDisplayingSheet && !AccountManager.shared.activeAccounts.isEmpty
|
return !isDisplayingSheet && !AccountManager.shared.activeAccounts.isEmpty
|
||||||
}
|
}
|
||||||
if item.action == #selector(showAddTwitterFeedWindow(_:)) {
|
if item.action == #selector(showAddTwitterFeedWindow(_:)) {
|
||||||
|
guard !isDisplayingSheet && !AccountManager.shared.activeAccounts.isEmpty else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
return ExtensionPointManager.shared.activeExtensionPoints.values.contains(where: { $0 is TwitterFeedProvider })
|
return ExtensionPointManager.shared.activeExtensionPoints.values.contains(where: { $0 is TwitterFeedProvider })
|
||||||
}
|
}
|
||||||
#if !MAC_APP_STORE
|
#if !MAC_APP_STORE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user