Disable add new item button when there are no active accounts
This commit is contained in:
parent
438745f246
commit
90ea9ebb50
|
@ -259,6 +259,7 @@
|
|||
</navigationItem>
|
||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||
<connections>
|
||||
<outlet property="addNewItemButton" destination="yo6-w4-SfI" id="NbL-RH-N4J"/>
|
||||
<outlet property="markAllAsReadButton" destination="ddj-Ya-Wol" id="jjr-OK-4zl"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue