Activate amount row after paste or qr scan

pull/2/head
Michael Scoff 7 years ago
parent 25ff88e7e0
commit 49e75e2665
  1. 10
      Trust/Transfer/ViewControllers/SendViewController.swift

@ -155,9 +155,7 @@ class SendViewController: FormViewController {
addressRow?.value = value addressRow?.value = value
addressRow?.reload() addressRow?.reload()
if amountRow?.value?.isEmpty == true { activateAmountView()
amountRow?.cell.textField.becomeFirstResponder()
}
} }
@objc func useMaxAmount() { @objc func useMaxAmount() {
@ -167,6 +165,10 @@ class SendViewController: FormViewController {
amountRow?.reload() amountRow?.reload()
} }
func activateAmountView() {
amountRow?.cell.textField.becomeFirstResponder()
}
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
@ -183,5 +185,7 @@ extension SendViewController: QRCodeReaderDelegate {
guard let result = QRURLParser.from(string: result) else { return } guard let result = QRURLParser.from(string: result) else { return }
addressRow?.value = result.address addressRow?.value = result.address
addressRow?.reload() addressRow?.reload()
activateAmountView()
} }
} }

Loading…
Cancel
Save