Browse Source

Hide Recommended Relays Section if Empty

Closes: #293
Changelog-Changed: Hide Recommended Relays Section if Empty
translations_damus-localizations-en-us-xcloc-localized-contents-en-us-xliff--master_es_419
Joel Klabo 2 years ago
committed by William Casarin
parent
commit
45e64dc42c
  1. 8
      damus/Views/ConfigView.swift

8
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)
}
}
}

Loading…
Cancel
Save