mirror of
https://github.com/lil-org/tokenary.git
synced 2024-11-30 13:02:49 +03:00
Setup connect button on iOS
This commit is contained in:
parent
ffbe969759
commit
f6ae749f73
@ -96,6 +96,10 @@ class AccountsListViewController: UIViewController, DataStateContainer {
|
||||
tableView.contentInset.top += 70
|
||||
tableView.verticalScrollIndicatorInsets.bottom += bottomOverlayHeight
|
||||
|
||||
// TODO: select all correct initiall cells
|
||||
// tableView.selectRow(at: IndexPath(row: 0, section: 0), animated: true, scrollPosition: .none)
|
||||
updatePrimaryButton()
|
||||
|
||||
if let peer = selectAccountAction?.peer {
|
||||
websiteNameLabel.text = peer.name
|
||||
if let urlString = peer.iconURLString, let url = URL(string: urlString) {
|
||||
@ -136,6 +140,10 @@ class AccountsListViewController: UIViewController, DataStateContainer {
|
||||
}
|
||||
}
|
||||
|
||||
private func updatePrimaryButton() {
|
||||
primaryButton.isEnabled = selectAccountAction?.selectedAccounts.isEmpty == false
|
||||
}
|
||||
|
||||
private func updateCellModels() {
|
||||
sections = []
|
||||
var privateKeyAccountCellModels = [CellModel]()
|
||||
@ -523,10 +531,12 @@ extension AccountsListViewController: UITableViewDelegate {
|
||||
|
||||
func tableView(_ tableView: UITableView, didDeselectRowAt indexPath: IndexPath) {
|
||||
// TODO: implement deselect
|
||||
updatePrimaryButton()
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
// TODO: implement new account selection logic
|
||||
updatePrimaryButton()
|
||||
return
|
||||
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
|
Loading…
Reference in New Issue
Block a user