WireGuardApp: Refactor indicator initialization

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
Andrej Mihajlov 2020-12-14 16:22:52 +01:00 committed by Jason A. Donenfeld
parent 44704ba892
commit 761f635e16
1 changed files with 5 additions and 6 deletions

View File

@ -32,15 +32,14 @@ class TunnelsListTableViewController: UIViewController {
}()
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 = UIActivityIndicatorView(style: .gray)
}
busyIndicator.hidesWhenStopped = true
return busyIndicator
}
}()
var detailDisplayedTunnel: TunnelContainer?