diff options
author | Andrej Mihajlov <and@mullvad.net> | 2020-12-14 16:38:16 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-12-15 15:56:22 +0100 |
commit | d3400e3a8021ec2d81757f3fb501b18812ba6d49 (patch) | |
tree | f986881c47df48194617f2b6beb31b4e02ef35e3 | |
parent | WireGuardApp: Use Bundle.forInfoDictionaryKey to access Info.plist fields (diff) | |
download | wireguard-apple-d3400e3a8021ec2d81757f3fb501b18812ba6d49.tar.xz wireguard-apple-d3400e3a8021ec2d81757f3fb501b18812ba6d49.zip |
WireGuardApp: Refactor indicator view initialization
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
-rw-r--r-- | Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift b/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift index 3648fbb..8065f9e 100644 --- a/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift +++ b/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift @@ -29,15 +29,14 @@ class TunnelListCell: UITableViewCell { }() let busyIndicator: UIActivityIndicatorView = { + let busyIndicator: UIActivityIndicatorView if #available(iOS 13.0, *) { - let busyIndicator = UIActivityIndicatorView(style: .medium) - busyIndicator.hidesWhenStopped = true - return busyIndicator + busyIndicator = UIActivityIndicatorView(style: .medium) } else { - let busyIndicator = UIActivityIndicatorView(style: .gray) - busyIndicator.hidesWhenStopped = true - return busyIndicator + busyIndicator = UIActivityIndicatorView(style: .gray) } + busyIndicator.hidesWhenStopped = true + return busyIndicator }() let statusSwitch = UISwitch() |