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: {
|
||||
Text(policyFooterDescription)
|
||||
Text(policyFooterDescription ?? "")
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: l10n, on-demand
|
||||
var policyFooterDescription: String {
|
||||
guard onDemand.isEnabled else {
|
||||
return "" // better animation than removing footer completely
|
||||
}
|
||||
let suffix: String
|
||||
switch onDemand.policy {
|
||||
case .any:
|
||||
|
|
Loading…
Reference in New Issue