Hide Recommended Relays Section if Empty

Closes: #293
Changelog-Changed: Hide Recommended Relays Section if Empty
This commit is contained in:
Joel Klabo
2023-01-08 21:48:29 -08:00
committed by William Casarin
parent 5a32a384c4
commit 45e64dc42c

View File

@@ -70,11 +70,13 @@ struct ConfigView: View {
} }
} }
if recommended.count > 0 {
Section(NSLocalizedString("Recommended Relays", comment: "Section title for recommend relay servers that could be added as part of configuration")) { 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 List(recommended, id: \.url) { r in
RecommendedRelayView(damus: state, relay: r.url.absoluteString) RecommendedRelayView(damus: state, relay: r.url.absoluteString)
} }
} }
}
Section(NSLocalizedString("Public Account ID", comment: "Section title for the user's public account ID.")) { Section(NSLocalizedString("Public Account ID", comment: "Section title for the user's public account ID.")) {
HStack { HStack {