Skip to content

Commit

Permalink
Merge pull request #38091 from Expensify/marco-fixUnreadMarkerIssue
Browse files Browse the repository at this point in the history
[CP Staging] Avoid using useCallback in trackVerticalScrolling
  • Loading branch information
amyevans authored Mar 11, 2024
2 parents 96a3a38 + 06c7fc5 commit b8f16ba
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/home/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,11 @@ function ReportActionsList({
}
};

const trackVerticalScrolling = useCallback((event: NativeSyntheticEvent<NativeScrollEvent>) => {
const trackVerticalScrolling = (event: NativeSyntheticEvent<NativeScrollEvent>) => {
scrollingVerticalOffset.current = event.nativeEvent.contentOffset.y;
handleUnreadFloatingButton();
onScroll?.(event);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
};

const scrollToBottomAndMarkReportAsRead = () => {
reportScrollManager.scrollToBottom();
Expand Down

0 comments on commit b8f16ba

Please sign in to comment.