Disable add new item button when there are no active accounts

This commit is contained in:
Phil Viso
2019-05-19 16:08:48 -05:00
parent 438745f246
commit 90ea9ebb50
2 changed files with 4 additions and 1 deletions

View File

@@ -14,7 +14,8 @@ import RSTree
class MasterFeedViewController: ProgressTableViewController, UndoableCommandRunner {
@IBOutlet weak var markAllAsReadButton: UIBarButtonItem!
@IBOutlet private weak var markAllAsReadButton: UIBarButtonItem!
@IBOutlet private weak var addNewItemButton: UIBarButtonItem!
var undoableCommands = [UndoableCommand]()
@@ -596,6 +597,7 @@ private extension MasterFeedViewController {
func updateUI() {
markAllAsReadButton.isEnabled = navState.isAnyUnreadAvailable
addNewItemButton.isEnabled = !AccountManager.shared.activeAccounts.isEmpty
}
func configureCellsForRepresentedObject(_ representedObject: AnyObject) {