Skip to content

Fix iPhone Duo having stale width in some cases - #170

Merged
bryankeller merged 2 commits into
airbnb:masterfrom
ephraimkunz:ekunz-duo-fix
Oct 13, 2026
Merged

bryankeller merged 2 commits into
airbnb:masterfrom
ephraimkunz:ekunz-duo-fix

Conversation

@ephraimkunz

Copy link
Copy Markdown
Contributor

Details

When rotating a magazine layout on a closed iPhone Duo, I can consistently reproduce an issue where there is a stale width for cells.

Before

Screen.Recording.2026-10-12.at.5.20.04.PM.mov

After

Screen.Recording.2026-10-12.at.5.34.06.PM.mov

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

Comment thread MagazineLayout/Public/MagazineLayout.swift Outdated
_delegateMagazineLayout = currentCollectionView.delegate as? UICollectionViewDelegateMagazineLayout

// Save the previous collection view width and horizontal insets if necessary
if prepareActions.contains(.cachePreviousHorizontalMetrics) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this action any more, since we can just check it below.

@bryankeller bryankeller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@bryankeller
bryankeller merged commit dde1222 into airbnb:master Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants