Don't select account from import window

This commit is contained in:
Ivan Grachev 2021-07-20 23:26:07 +03:00
parent 6a342016b1
commit bf548c30fa

View File

@ -20,11 +20,10 @@ class ImportViewController: NSViewController {
} }
@IBAction func actionButtonTapped(_ sender: Any) { @IBAction func actionButtonTapped(_ sender: Any) {
let account = accountsService.addAccount(input: textField.stringValue) if accountsService.addAccount(input: textField.stringValue) != nil {
if let account = account, accountsService.getAccounts().count == 1, let onSelectedAccount = onSelectedAccount {
onSelectedAccount(account)
} else {
showAccountsList() showAccountsList()
} else {
// TODO: show error message
} }
} }