Move SectionDividerSpaced() out of the SectionView { ... } block so it acts
as inter-section spacing instead of being rendered as the section's last
child. Matches the pattern used by every other section in ChatInfoLayout.
Plan: plans/2026-05-25-fix-e2e-encryption-section-divider.md
2.5 KiB
Fix E2E encryption section divider rendered inside the section
Branch: nd/fix-e2e-encryption-section-divider · base: master.
Problem
On the contact info screen (Android and desktop, current master), the "E2E encryption — Quantum resistant / Standard" card has a horizontal divider line cutting across it under its single row, followed by extra padded space — visually reading as the card being sliced in two with a second, empty card underneath. Repros for any 1:1 contact with an active connection. Behaviour of the row itself is correct; bug is purely visual.
Fix
One line in apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatInfoView.kt — move SectionDividerSpaced() out of the SectionView { ... } block:
if (conn != null) {
SectionView {
InfoRow("E2E encryption", if (conn.connPQEnabled) "Quantum resistant" else "Standard")
- SectionDividerSpaced()
}
+ SectionDividerSpaced()
}
Total diff: 1 file, +1 / −1.
Cause
Two unrelated changes combined to produce the visible bug:
-
PR #4060 (
9e3f528d4, "android: remove experimental PQ toggle") removed the conditionalAllowContactPQButton/SectionTextFooterthat used to sit between theInfoRowand the divider — but leftSectionDividerSpaced()inside theSectionView { ... }block. At that pointSectionViewwas a plain column, so the leftover divider only looked like extra inter-section spacing. -
PR #6777 (
df5ea3d46, "android, desktop: new settings section design") wrappedSectionView's content inCardColumnwithSectionCardShape, giving each section a rounded card background. After this, anything drawn by the section content — including the leftoverDivider— is drawn inside the card.
Rendered structure on current master:
SectionView (card background, rounded shape)
└ CardColumn
├ InfoRow("E2E encryption", ...)
├ Divider ← line cutting across the card
└ 18 dp bottom padding ← reads as a second, empty card
After the fix the divider re-parents to the enclosing ChatInfoLayout column and sits between the E2E card and the next section's card, matching the pattern used by every other section on the screen.
Risk
- One composable call site, structural move of a single node; no logic, state, or styling change.
- iOS is a separate codebase and is unaffected.
- Grep confirms no other
SectionDividerSpacedcall sits inside aSectionView { ... }inapps/multiplatform. - Rollback:
git revertthe fix commit.