damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 45e64dc42c31bd72df01080b1c51ded14e84d278
parent 5a32a384c4bceb1057d193a94a40b73cbd010f34
Author: Joel Klabo <joelklabo@gmail.com>
Date:   Sun,  8 Jan 2023 21:48:29 -0800

Hide Recommended Relays Section if Empty

Closes: #293
Changelog-Changed: Hide Recommended Relays Section if Empty

Diffstat:
Mdamus/Views/ConfigView.swift | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/damus/Views/ConfigView.swift b/damus/Views/ConfigView.swift @@ -70,9 +70,11 @@ struct ConfigView: View { } } - Section(NSLocalizedString("Recommended Relays", comment: "Section title for recommend relay servers that could be added as part of configuration")) { - List(recommended, id: \.url) { r in - RecommendedRelayView(damus: state, relay: r.url.absoluteString) + if recommended.count > 0 { + Section(NSLocalizedString("Recommended Relays", comment: "Section title for recommend relay servers that could be added as part of configuration")) { + List(recommended, id: \.url) { r in + RecommendedRelayView(damus: state, relay: r.url.absoluteString) + } } }