diff options
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift index 2174602..3165553 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift @@ -62,7 +62,7 @@ class TunnelDetailTableViewController: UITableViewController { func showConfirmationAlert(message: String, buttonTitle: String, from sourceView: UIView, onConfirmed: @escaping (() -> Void)) { - let destroyAction = UIAlertAction(title: buttonTitle, style: .destructive) { (action) in + let destroyAction = UIAlertAction(title: buttonTitle, style: .destructive) { (_) in onConfirmed() } let cancelAction = UIAlertAction(title: "Cancel", style: .cancel) @@ -221,11 +221,11 @@ class TunnelDetailTableViewStatusCell: UITableViewCell { get { return statusSwitch.isUserInteractionEnabled } set(value) { statusSwitch.isUserInteractionEnabled = value } } - var onSwitchToggled: ((Bool) -> Void)? = nil + var onSwitchToggled: ((Bool) -> Void)? private var isOnSwitchToggledHandlerEnabled: Bool = true let statusSwitch: UISwitch - private var statusObservervationToken: AnyObject? = nil + private var statusObservervationToken: AnyObject? override init(style: UITableViewCellStyle, reuseIdentifier: String?) { statusSwitch = UISwitch() @@ -382,7 +382,7 @@ class TunnelDetailTableViewButtonCell: UITableViewCell { get { return button.tintColor == UIColor.red } set(value) { button.tintColor = value ? UIColor.red : buttonStandardTintColor } } - var onTapped: (() -> Void)? = nil + var onTapped: (() -> Void)? let button: UIButton var buttonStandardTintColor: UIColor |