Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #5636: Invalidate NTP layout when sections change to fix News layout
Browse files Browse the repository at this point in the history
On first launches default favourites are added async which cause FRCs to fire after NTP is already laid out, which trigger `sectionDidChange`. When this happens we were reloading the changed sections without animation but this would sometimes cause layout issues with sections not reloaded like Brave News.
  • Loading branch information
kylehickinson committed Feb 3, 2023
1 parent ca22cab commit 0f65bd4
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ class NewTabPageViewController: UIViewController {
UIView.performWithoutAnimation {
self?.collectionView.reloadSections(IndexSet(integer: index))
}
self?.collectionView.collectionViewLayout.invalidateLayout()
}
}
}
Expand Down

0 comments on commit 0f65bd4

Please sign in to comment.