fix(rn,filmstrip) avoid fast scroll trigggering visibility notifications
An item won't be considered visible until it has been visible for 500ms.
This commit is contained in:
parent
8db6e783f1
commit
36f604aab8
|
@ -95,8 +95,10 @@ class Filmstrip extends PureComponent<Props> {
|
||||||
this._separateLocalThumbnail = Platform.OS !== 'android';
|
this._separateLocalThumbnail = Platform.OS !== 'android';
|
||||||
|
|
||||||
this._viewabilityConfig = {
|
this._viewabilityConfig = {
|
||||||
itemVisiblePercentThreshold: 30
|
itemVisiblePercentThreshold: 30,
|
||||||
|
minimumViewTime: 500
|
||||||
};
|
};
|
||||||
|
|
||||||
this._keyExtractor = this._keyExtractor.bind(this);
|
this._keyExtractor = this._keyExtractor.bind(this);
|
||||||
this._getItemLayout = this._getItemLayout.bind(this);
|
this._getItemLayout = this._getItemLayout.bind(this);
|
||||||
this._onViewableItemsChanged = this._onViewableItemsChanged.bind(this);
|
this._onViewableItemsChanged = this._onViewableItemsChanged.bind(this);
|
||||||
|
|
|
@ -111,8 +111,10 @@ class TileView extends PureComponent<Props> {
|
||||||
this._keyExtractor = this._keyExtractor.bind(this);
|
this._keyExtractor = this._keyExtractor.bind(this);
|
||||||
this._onViewableItemsChanged = this._onViewableItemsChanged.bind(this);
|
this._onViewableItemsChanged = this._onViewableItemsChanged.bind(this);
|
||||||
this._renderThumbnail = this._renderThumbnail.bind(this);
|
this._renderThumbnail = this._renderThumbnail.bind(this);
|
||||||
|
|
||||||
this._viewabilityConfig = {
|
this._viewabilityConfig = {
|
||||||
itemVisiblePercentThreshold: 30
|
itemVisiblePercentThreshold: 30,
|
||||||
|
minimumViewTime: 500
|
||||||
};
|
};
|
||||||
this._flatListStyles = {
|
this._flatListStyles = {
|
||||||
...styles.flatListTileView
|
...styles.flatListTileView
|
||||||
|
|
Loading…
Reference in New Issue