Skip to content

Commit ea7cef1

Browse files
copilot comments
1 parent 9a2c504 commit ea7cef1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core-mobile/patches/react-native-collapsible-tab-view+9.0.0-rc.0.patch

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ index 9ec4cfe..3a068c9 100644
4848
@@ -227,7 +227,9 @@ export const Container = React.memo(
4949
const toggleSyncScrollFrame = (toggle: boolean) =>
5050
syncScrollFrame.setActive(toggle)
51+
const lastSyncBucketRef = React.useRef(0)
5152
const syncScrollFrame = useFrameCallback(({ timeSinceFirstFrame }) => {
5253
- syncCurrentTabScrollPosition()
53-
+ if (timeSinceFirstFrame % 100 === 0) {
54+
+ const bucket = Math.floor(timeSinceFirstFrame / 100)
55+
+ if (bucket !== lastSyncBucketRef.current) {
56+
+ lastSyncBucketRef.current = bucket
5457
+ syncCurrentTabScrollPosition()
5558
+ }
5659
if (timeSinceFirstFrame > 1500) {

0 commit comments

Comments
 (0)