mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 16:54:12 +00:00
Skip sidebar overlap when there is no remainingWidth, so it can’t produce nonpositive cell widths.
This commit is contained in:
1 parent
2dc650d449
commit
d46e36d7dd
1 file changed
+3
-1
@@ -844,9 +844,11 @@ 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
|
||||
section.contentInsets = NSDirectionalEdgeInsets(
|
||||
top: 0,
|
||||
leading: layoutEnvironment.container.contentInsets.leading, // Sidebar width
|
||||
leading: remainingWidth > 0 ? sidebarOverlapWidth : 0,
|
||||
bottom: 0,
|
||||
trailing: 0
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user