Skip to content

Commit c91c7ad

Browse files
committed
Fix
1 parent 634dde8 commit c91c7ad

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

Mixin/UserInterface/Controllers/Common/KeyboardBasedLayoutViewController.swift

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class KeyboardBasedLayoutViewController: UIViewController {
6161
layout(for: frame)
6262
} else {
6363
UIView.performWithoutAnimation {
64+
view.layoutIfNeeded()
6465
layout(for: frame)
6566
}
6667
}

Mixin/UserInterface/Controllers/Wallet/TransferOutViewController.swift

+4-6
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,12 @@ class TransferOutViewController: KeyboardBasedLayoutViewController {
237237
let transferOverTenDollars = asset.priceUsd.doubleValue * amount.doubleValue >= 10
238238
if !ignoreStrangerTransferConfirmation && isStranger && strangerTransferConfirmation && transferOverTenDollars {
239239
let window = StrangerTransferHintWindow.instance(userItem: user)
240-
window.continueHandler = {
240+
window.onContinue = {
241241
checkPay()
242242
}
243-
window.cancelHandler = {
244-
DispatchQueue.main.async {
245-
self.continueButton.isBusy = false
246-
self.amountTextField.becomeFirstResponder()
247-
}
243+
window.onCancel = {
244+
self.continueButton.isBusy = false
245+
self.amountTextField.becomeFirstResponder()
248246
}
249247
window.presentPopupControllerAnimated()
250248
} else {

Mixin/UserInterface/Windows/StrangerTransferHintWindow.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ final class StrangerTransferHintWindow: BottomSheetView {
88
@IBOutlet weak var idLabel: UILabel!
99
@IBOutlet weak var hintLabel: LineHeightLabel!
1010

11-
var continueHandler: (() -> Void)?
12-
var cancelHandler: (() -> Void)?
11+
var onContinue: (() -> Void)?
12+
var onCancel: (() -> Void)?
1313

1414
private var canDismiss = false
1515

@@ -31,14 +31,14 @@ final class StrangerTransferHintWindow: BottomSheetView {
3131

3232
@IBAction func continueAction(_ sender: Any) {
3333
canDismiss = true
34+
onContinue?()
3435
dismissPopupControllerAnimated()
35-
continueHandler?()
3636
}
3737

3838
@IBAction func cancelAction(_ sender: Any) {
3939
canDismiss = true
40+
onCancel?()
4041
dismissPopupControllerAnimated()
41-
cancelHandler?()
4242
}
4343

4444
}

0 commit comments

Comments
 (0)