Compute the timeline's remaining width from contentSize, which includes the sidebar overlap, so the sidebar-compensating inset doesn't drop out and let the timeline render under the sidebar.

This commit is contained in:
Brent Simmons committed 2026-08-10 11:18:13 -07:00
1 parent d7f1d1694c
commit 368a09beed
1 file changed
+2 -1
@@ -845,7 +845,8 @@ private extension MainTimelineModernViewController {
/// Note to future self: apply insets that affect cell width
/// calculations (leading swipe actions with sidebar visible)
let sidebarOverlapWidth = layoutEnvironment.container.contentInsets.leading
let remainingWidth = layoutEnvironment.container.effectiveContentSize.width - sidebarOverlapWidth
// container.contentSize includes the width under the sidebar.
let remainingWidth = layoutEnvironment.container.contentSize.width - sidebarOverlapWidth
section.contentInsets = NSDirectionalEdgeInsets(
top: 0,
leading: remainingWidth > 0 ? sidebarOverlapWidth : 0,