From c437fc59eed79755a6bb38964e8043f238a2ece2 Mon Sep 17 00:00:00 2001 From: another-simple-pixel Date: Sat, 16 May 2026 13:19:46 -0700 Subject: [PATCH] ServersSummaryView: split SMP/XFTP server summary into separate top-level cards The summary layouts wrapped Stats / Subscriptions / Sessions inside the outer Server address SectionView, which produced nested cards and pushed the Statistics 'Starting from...' footer inside a card. Unnest them so each section is its own card with proper spacing and the footer renders outside. --- .../views/chatlist/ServersSummaryView.kt | 54 ++++++++----------- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ServersSummaryView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ServersSummaryView.kt index 80f24033b6..2decacc94a 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ServersSummaryView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ServersSummaryView.kt @@ -533,27 +533,23 @@ fun XFTPServerSummaryLayout(summary: XFTPServerSummary, statsStartedAt: Instant, SelectionContainer { Text( summary.xftpServer, - Modifier.padding(start = DEFAULT_PADDING, top = 5.dp, end = DEFAULT_PADDING, bottom = 10.dp), + Modifier.padding(start = CARD_ITEM_PADDING, top = 5.dp, end = CARD_ITEM_PADDING, bottom = 10.dp), style = TextStyle( fontFamily = FontFamily.Monospace, fontSize = 16.sp, color = MaterialTheme.colors.secondary ) ) } - if (summary.stats != null || summary.sessions != null) { - SectionDividerSpaced() - } + } - if (summary.stats != null) { - XFTPStatsView(stats = summary.stats, rh = rh, statsStartedAt = statsStartedAt) - if (summary.sessions != null) { - SectionDividerSpaced(maxTopPadding = true) - } - } + if (summary.stats != null) { + SectionDividerSpaced() + XFTPStatsView(stats = summary.stats, rh = rh, statsStartedAt = statsStartedAt) + } - if (summary.sessions != null) { - ServerSessionsView(summary.sessions) - } + if (summary.sessions != null) { + SectionDividerSpaced(maxTopPadding = true) + ServerSessionsView(summary.sessions) } SectionBottomSpacer() @@ -565,34 +561,28 @@ fun SMPServerSummaryLayout(summary: SMPServerSummary, statsStartedAt: Instant, r SelectionContainer { Text( summary.smpServer, - Modifier.padding(start = DEFAULT_PADDING, top = 5.dp, end = DEFAULT_PADDING, bottom = 10.dp), + Modifier.padding(start = CARD_ITEM_PADDING, top = 5.dp, end = CARD_ITEM_PADDING, bottom = 10.dp), style = TextStyle( fontFamily = FontFamily.Monospace, fontSize = 16.sp, color = MaterialTheme.colors.secondary ) ) } - if (summary.stats != null || summary.subs != null || summary.sessions != null) { - SectionDividerSpaced() - } + } - if (summary.stats != null) { - SMPStatsView(stats = summary.stats, remoteHostInfo = rh, statsStartedAt = statsStartedAt) - if (summary.subs != null || summary.sessions != null) { - SectionDividerSpaced(maxTopPadding = true) - } - } + if (summary.stats != null) { + SectionDividerSpaced() + SMPStatsView(stats = summary.stats, remoteHostInfo = rh, statsStartedAt = statsStartedAt) + } - if (summary.subs != null) { - SMPSubscriptionsSection(subs = summary.subs, summary = summary, rh = rh) - if (summary.sessions != null) { - SectionDividerSpaced() - } - } + if (summary.subs != null) { + SectionDividerSpaced(maxTopPadding = true) + SMPSubscriptionsSection(subs = summary.subs, summary = summary, rh = rh) + } - if (summary.sessions != null) { - ServerSessionsView(summary.sessions) - } + if (summary.sessions != null) { + SectionDividerSpaced(maxTopPadding = true) + ServerSessionsView(summary.sessions) } SectionBottomSpacer()