From 10c5ca4e1ae884ca6372e8b7a4115769088706a6 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 19 May 2019 14:23:54 -0500 Subject: [PATCH] Disable refresh and add NNW app news when there are no active accounts. --- Mac/AppDelegate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index f39c94071..2e593ac20 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -273,10 +273,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, let isDisplayingSheet = mainWindowController?.isDisplayingSheet ?? false if item.action == #selector(refreshAll(_:)) { - return !AccountManager.shared.refreshInProgress + return !AccountManager.shared.refreshInProgress && !AccountManager.shared.activeAccounts.isEmpty } if item.action == #selector(addAppNews(_:)) { - return !isDisplayingSheet && !AccountManager.shared.anyAccountHasFeedWithURL(appNewsURLString) + return !isDisplayingSheet && !AccountManager.shared.anyAccountHasFeedWithURL(appNewsURLString) && !AccountManager.shared.activeAccounts.isEmpty } if item.action == #selector(sortByNewestArticleOnTop(_:)) || item.action == #selector(sortByOldestArticleOnTop(_:)) { return mainWindowController?.isOpen ?? false