Always displaying now transferMoneyAction, but disabling it if no accounts supporting transferring money are added
This commit is contained in:
parent
de72722e4c
commit
0133787ee4
|
@ -86,9 +86,9 @@ class TabBarController : UITabBarController, UITabBarControllerDelegate {
|
|||
private func showNewOptionsActionSheet() {
|
||||
let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
|
||||
|
||||
if data.hasAccountsThatSupportTransferringMoney {
|
||||
alert.addAction(UIAlertAction(title: "Show transfer money dialog".localize(), style: .default, handler: { _ in self.showView(TransferMoneyDialog()) }))
|
||||
}
|
||||
let transferMoneyAction = UIAlertAction(title: "Show transfer money dialog".localize(), style: .default, handler: { _ in self.showView(TransferMoneyDialog()) })
|
||||
transferMoneyAction.isEnabled = data.hasAccountsThatSupportTransferringMoney
|
||||
alert.addAction(transferMoneyAction)
|
||||
|
||||
alert.addAction(UIAlertAction(title: "Add account".localize(), style: .default, handler: { _ in self.showView(AddAccountDialog()) } ))
|
||||
alert.addAction(UIAlertAction(title: "Cancel".localize(), style: .cancel, handler: nil))
|
||||
|
|
Loading…
Reference in New Issue