From 904b3b67e292e7936947505cf2476a9531b95c8d Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Mon, 8 Aug 2022 05:01:19 -0700 Subject: [PATCH] Remove redundant _forceDispatchNextScrollEvent calls Summary: changelog: [internal] `_forceDispatchNextScrollEvent` is already called inside `- (void)scrollToOffset:(CGPoint)offset animated:(BOOL)animated`. No need to call it before. Reviewed By: cipolleschi Differential Revision: D38499299 fbshipit-source-id: cf6635e02bf582346869f77194cf06be7939351f --- .../ComponentViews/ScrollView/RCTScrollViewComponentView.mm | 2 -- 1 file changed, 2 deletions(-) diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm index 1a5aa5b1f8b..9101970c8a0 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm @@ -590,7 +590,6 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol offset = CGPointMake(localX, localY); } - [self _forceDispatchNextScrollEvent]; [self scrollToOffset:offset animated:animated]; } @@ -645,7 +644,6 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol - (void)scrollToOffset:(CGPoint)offset { - [self _forceDispatchNextScrollEvent]; [self scrollToOffset:offset animated:YES]; }