From 49e75e266568d106e5f488b8752761443f8d55f1 Mon Sep 17 00:00:00 2001 From: Michael Scoff Date: Sat, 2 Dec 2017 02:15:16 -0800 Subject: [PATCH] Activate amount row after paste or qr scan --- .../Transfer/ViewControllers/SendViewController.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Trust/Transfer/ViewControllers/SendViewController.swift b/Trust/Transfer/ViewControllers/SendViewController.swift index dbb31e465..b5a814cce 100644 --- a/Trust/Transfer/ViewControllers/SendViewController.swift +++ b/Trust/Transfer/ViewControllers/SendViewController.swift @@ -155,9 +155,7 @@ class SendViewController: FormViewController { addressRow?.value = value addressRow?.reload() - if amountRow?.value?.isEmpty == true { - amountRow?.cell.textField.becomeFirstResponder() - } + activateAmountView() } @objc func useMaxAmount() { @@ -167,6 +165,10 @@ class SendViewController: FormViewController { amountRow?.reload() } + func activateAmountView() { + amountRow?.cell.textField.becomeFirstResponder() + } + required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } @@ -183,5 +185,7 @@ extension SendViewController: QRCodeReaderDelegate { guard let result = QRURLParser.from(string: result) else { return } addressRow?.value = result.address addressRow?.reload() + + activateAmountView() } }