From 7420b607ce7cf8fe27ddebfbd346af08322519d8 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sat, 2 May 2020 15:06:59 -0500 Subject: [PATCH] Disable the Add Twitter menu item if there are no active accounts --- Mac/AppDelegate.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index 80f68a1b9..2d2883160 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -404,6 +404,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, return !isDisplayingSheet && !AccountManager.shared.activeAccounts.isEmpty } if item.action == #selector(showAddTwitterFeedWindow(_:)) { + guard !isDisplayingSheet && !AccountManager.shared.activeAccounts.isEmpty else { + return false + } return ExtensionPointManager.shared.activeExtensionPoints.values.contains(where: { $0 is TwitterFeedProvider }) } #if !MAC_APP_STORE