Skip to content

Commit

Permalink
Merge pull request #31042 from Expensify/thienlnam-cherry-pick-stagin…
Browse files Browse the repository at this point in the history
…g-30962-1
  • Loading branch information
mountiny authored Nov 8, 2023
2 parents 0db1293 + 425268d commit e1561b9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 21 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001039605
versionName "1.3.96-5"
versionCode 1001039606
versionName "1.3.96-6"
}

flavorDimensions "default"
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.96.5</string>
<string>1.3.96.6</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.96.5</string>
<string>1.3.96.6</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.3.96-5",
"version": "1.3.96-6",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
20 changes: 6 additions & 14 deletions src/components/InvertedFlatList/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import PropTypes from 'prop-types';
import React, {forwardRef, useEffect, useRef} from 'react';
import {DeviceEventEmitter, FlatList, StyleSheet} from 'react-native';
import _ from 'underscore';
import styles from '@styles/styles';
import CONST from '@src/CONST';
import BaseInvertedFlatList from './BaseInvertedFlatList';
Expand All @@ -24,31 +23,24 @@ const propTypes = {
// It's a HACK alert since FlatList has inverted scrolling on web
function InvertedFlatList(props) {
const {innerRef, contentContainerStyle} = props;
const listRef = React.createRef();

const lastScrollEvent = useRef(null);
const scrollEndTimeout = useRef(null);
const updateInProgress = useRef(false);
const eventHandler = useRef(null);

useEffect(() => {
if (!_.isFunction(innerRef)) {
// eslint-disable-next-line no-param-reassign
innerRef.current = listRef.current;
} else {
innerRef(listRef);
}

return () => {
useEffect(
() => () => {
if (scrollEndTimeout.current) {
clearTimeout(scrollEndTimeout.current);
}

if (eventHandler.current) {
eventHandler.current.remove();
}
};
}, [innerRef, listRef]);
},
[innerRef],
);

/**
* Emits when the scrolling is in progress. Also,
Expand Down Expand Up @@ -114,7 +106,7 @@ function InvertedFlatList(props) {
<BaseInvertedFlatList
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
ref={listRef}
ref={innerRef}
shouldMeasureItems
contentContainerStyle={StyleSheet.compose(contentContainerStyle, styles.justifyContentEnd)}
onScroll={handleScroll}
Expand Down

0 comments on commit e1561b9

Please sign in to comment.