ChatInfoView: hide Servers section header when there is no server content

When both chatSubStatus and cStats are null, the SectionView body rendered as empty (zero-height card) but the SERVERS title still appeared, leaving an orphan header between E2E encryption and Clear chat. Gate the whole section on having at least one of the two.
This commit is contained in:
another-simple-pixel
2026-05-16 14:53:24 -07:00
parent 566e6c1934
commit 2957e4033c
@@ -636,9 +636,9 @@ fun ChatInfoLayout(
SectionDividerSpaced(maxTopPadding = true)
}
if (contact.ready && contact.active) {
val chatSubStatus = chatModel.chatSubStatus.value
if (contact.ready && contact.active && (chatSubStatus != null || cStats != null)) {
SectionView(title = stringResource(MR.strings.conn_stats_section_title_servers)) {
val chatSubStatus = chatModel.chatSubStatus.value
if (chatSubStatus != null) {
SectionItemView({
AlertManager.shared.showAlertMsg(