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) {
let account = accountsService.addAccount(input: textField.stringValue)
if let account = account, accountsService.getAccounts().count == 1, let onSelectedAccount = onSelectedAccount {
onSelectedAccount(account)
} else {
if accountsService.addAccount(input: textField.stringValue) != nil {
showAccountsList()
} else {
// TODO: show error message
}
}