Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent expired flag from resetting #915

Merged
merged 3 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.6.1] - 2023-09-14

- Prevent an expired layout provider from being used again
- https://github.com/Shopify/flash-list/pull/915

## [1.6.0] - 2023-09-13

- Update types to match `react-native@0.72` view types.
Expand Down
2 changes: 1 addition & 1 deletion src/GridLayoutProviderWithProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export default class GridLayoutProviderWithProps<T> extends GridLayoutProvider {
}

public updateProps(props: FlashListProps<T>): GridLayoutProviderWithProps<T> {
this._hasExpired = this.props.numColumns !== props.numColumns;
const newInsetValues = applyContentContainerInsetForLayoutManager(
{
height: 0,
Expand All @@ -76,6 +75,7 @@ export default class GridLayoutProviderWithProps<T> extends GridLayoutProvider {
);
this._hasExpired =
this._hasExpired ||
this.props.numColumns !== props.numColumns ||
newInsetValues.height !== this.renderWindowInsets.height ||
newInsetValues.width !== this.renderWindowInsets.width;
this.renderWindowInsets = newInsetValues;
Expand Down
Loading