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>
|
</navigationItem>
|
||||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||||
<connections>
|
<connections>
|
||||||
|
<outlet property="addNewItemButton" destination="yo6-w4-SfI" id="NbL-RH-N4J"/>
|
||||||
<outlet property="markAllAsReadButton" destination="ddj-Ya-Wol" id="jjr-OK-4zl"/>
|
<outlet property="markAllAsReadButton" destination="ddj-Ya-Wol" id="jjr-OK-4zl"/>
|
||||||
</connections>
|
</connections>
|
||||||
</tableViewController>
|
</tableViewController>
|
||||||
|
|
|
@ -14,7 +14,8 @@ import RSTree
|
||||||
|
|
||||||
class MasterFeedViewController: ProgressTableViewController, UndoableCommandRunner {
|
class MasterFeedViewController: ProgressTableViewController, UndoableCommandRunner {
|
||||||
|
|
||||||
@IBOutlet weak var markAllAsReadButton: UIBarButtonItem!
|
@IBOutlet private weak var markAllAsReadButton: UIBarButtonItem!
|
||||||
|
@IBOutlet private weak var addNewItemButton: UIBarButtonItem!
|
||||||
|
|
||||||
var undoableCommands = [UndoableCommand]()
|
var undoableCommands = [UndoableCommand]()
|
||||||
|
|
||||||
|
@ -596,6 +597,7 @@ private extension MasterFeedViewController {
|
||||||
|
|
||||||
func updateUI() {
|
func updateUI() {
|
||||||
markAllAsReadButton.isEnabled = navState.isAnyUnreadAvailable
|
markAllAsReadButton.isEnabled = navState.isAnyUnreadAvailable
|
||||||
|
addNewItemButton.isEnabled = !AccountManager.shared.activeAccounts.isEmpty
|
||||||
}
|
}
|
||||||
|
|
||||||
func configureCellsForRepresentedObject(_ representedObject: AnyObject) {
|
func configureCellsForRepresentedObject(_ representedObject: AnyObject) {
|
||||||
|
|
Loading…
Reference in New Issue