Skip to content

Commit

Permalink
Merge pull request #9002 from Expensify/chirag-loadMoreChats-fix
Browse files Browse the repository at this point in the history
Loads more chats fix

(cherry picked from commit 251df8b)
  • Loading branch information
francoisl authored and OSBotify committed May 13, 2022
1 parent 334c55a commit c98d252
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/home/report/ReportActionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ const propTypes = {
/** Callback executed on scroll */
onScroll: PropTypes.func.isRequired,

/** Function to load more chats */
loadMoreChats: PropTypes.func.isRequired,

...withDrawerPropTypes,
...windowDimensionsPropTypes,
};
Expand Down Expand Up @@ -165,7 +168,7 @@ class ReportActionsList extends React.Component {
keyExtractor={this.keyExtractor}
initialRowHeight={32}
initialNumToRender={this.calculateInitialNumToRender()}
onEndReached={this.loadMoreChats}
onEndReached={this.props.loadMoreChats}
onEndReachedThreshold={0.75}
ListFooterComponent={this.props.isLoadingReportActions
? <ActivityIndicator size="small" color={themeColors.spinner} />
Expand Down
2 changes: 2 additions & 0 deletions src/pages/home/report/ReportActionsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class ReportActionsView extends React.Component {
this.toggleFloatingMessageCounter = this.toggleFloatingMessageCounter.bind(this);
this.updateNewMarkerPosition = this.updateNewMarkerPosition.bind(this);
this.updateMessageCounterCount = this.updateMessageCounterCount.bind(this);
this.loadMoreChats = this.loadMoreChats.bind(this);
this.recordTimeToMeasureItemLayout = this.recordTimeToMeasureItemLayout.bind(this);
this.scrollToBottomAndUpdateLastRead = this.scrollToBottomAndUpdateLastRead.bind(this);
this.updateNewMarkerAndMarkReadOnce = _.once(this.updateNewMarkerAndMarkRead.bind(this));
Expand Down Expand Up @@ -417,6 +418,7 @@ class ReportActionsView extends React.Component {
sortedReportActions={this.sortedReportActions}
mostRecentIOUReportSequenceNumber={this.mostRecentIOUReportSequenceNumber}
isLoadingReportActions={this.props.isLoadingReportActions}
loadMoreChats={this.loadMoreChats}
/>
<PopoverReportActionContextMenu ref={ReportActionContextMenu.contextMenuRef} />
<EmojiPicker ref={EmojiPickerAction.emojiPickerRef} />
Expand Down

0 comments on commit c98d252

Please sign in to comment.