Преглед изворни кода

fix(rn,filmstrip) avoid fast scroll trigggering visibility notifications

An item won't be considered visible until it has been visible for 500ms.
master
Saúl Ibarra Corretgé пре 3 година
родитељ
комит
36f604aab8

+ 3
- 1
react/features/filmstrip/components/native/Filmstrip.js Прегледај датотеку

@@ -95,8 +95,10 @@ class Filmstrip extends PureComponent<Props> {
95 95
         this._separateLocalThumbnail = Platform.OS !== 'android';
96 96
 
97 97
         this._viewabilityConfig = {
98
-            itemVisiblePercentThreshold: 30
98
+            itemVisiblePercentThreshold: 30,
99
+            minimumViewTime: 500
99 100
         };
101
+
100 102
         this._keyExtractor = this._keyExtractor.bind(this);
101 103
         this._getItemLayout = this._getItemLayout.bind(this);
102 104
         this._onViewableItemsChanged = this._onViewableItemsChanged.bind(this);

+ 3
- 1
react/features/filmstrip/components/native/TileView.js Прегледај датотеку

@@ -111,8 +111,10 @@ class TileView extends PureComponent<Props> {
111 111
         this._keyExtractor = this._keyExtractor.bind(this);
112 112
         this._onViewableItemsChanged = this._onViewableItemsChanged.bind(this);
113 113
         this._renderThumbnail = this._renderThumbnail.bind(this);
114
+
114 115
         this._viewabilityConfig = {
115
-            itemVisiblePercentThreshold: 30
116
+            itemVisiblePercentThreshold: 30,
117
+            minimumViewTime: 500
116 118
         };
117 119
         this._flatListStyles = {
118 120
             ...styles.flatListTileView

Loading…
Откажи
Сачувај