Omit footer when on-demand is disabled (#339)
Preserve footer in that case, just empty. Adding/removing footer seems to result in a worse animation.
This commit is contained in:
parent
388af4a73c
commit
b608d59d8f
|
@ -77,12 +77,15 @@ private extension OnDemandView {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} footer: {
|
} footer: {
|
||||||
Text(policyFooterDescription)
|
Text(policyFooterDescription ?? "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: l10n, on-demand
|
// FIXME: l10n, on-demand
|
||||||
var policyFooterDescription: String {
|
var policyFooterDescription: String {
|
||||||
|
guard onDemand.isEnabled else {
|
||||||
|
return "" // better animation than removing footer completely
|
||||||
|
}
|
||||||
let suffix: String
|
let suffix: String
|
||||||
switch onDemand.policy {
|
switch onDemand.policy {
|
||||||
case .any:
|
case .any:
|
||||||
|
|
Loading…
Reference in New Issue