WireGuardApp: Refactor indicator view initialization
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
parent
92517bd21e
commit
d3400e3a80
|
@ -29,15 +29,14 @@ class TunnelListCell: UITableViewCell {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
let busyIndicator: UIActivityIndicatorView = {
|
let busyIndicator: UIActivityIndicatorView = {
|
||||||
|
let busyIndicator: UIActivityIndicatorView
|
||||||
if #available(iOS 13.0, *) {
|
if #available(iOS 13.0, *) {
|
||||||
let busyIndicator = UIActivityIndicatorView(style: .medium)
|
busyIndicator = UIActivityIndicatorView(style: .medium)
|
||||||
busyIndicator.hidesWhenStopped = true
|
|
||||||
return busyIndicator
|
|
||||||
} else {
|
} else {
|
||||||
let busyIndicator = UIActivityIndicatorView(style: .gray)
|
busyIndicator = UIActivityIndicatorView(style: .gray)
|
||||||
busyIndicator.hidesWhenStopped = true
|
|
||||||
return busyIndicator
|
|
||||||
}
|
}
|
||||||
|
busyIndicator.hidesWhenStopped = true
|
||||||
|
return busyIndicator
|
||||||
}()
|
}()
|
||||||
|
|
||||||
let statusSwitch = UISwitch()
|
let statusSwitch = UISwitch()
|
||||||
|
|
Loading…
Reference in New Issue