Removed onReload and pull to refresh from StatusList, ScrollableList

• Removed:
- onReload and pull to refresh from StatusList, ScrollableList
This commit is contained in:
mgabdev 2020-11-04 21:05:34 -06:00
parent b6f7321c23
commit 880dad7b5a
2 changed files with 0 additions and 10 deletions

View File

@ -17,7 +17,6 @@ class ScrollableList extends React.PureComponent {
} }
state = { state = {
pullToRefreshTriggered: false,
cachedMediaWidth: 250, // Default media/card width using default Gab Social theme cachedMediaWidth: 250, // Default media/card width using default Gab Social theme
} }
@ -99,13 +98,6 @@ class ScrollableList extends React.PureComponent {
const { innerHeight } = this.window; const { innerHeight } = this.window;
const offset = scrollHeight - scrollTop - innerHeight; const offset = scrollHeight - scrollTop - innerHeight;
if (scrollTop < -80 && this.props.onReload && !this.state.pullToRefreshTriggered) {
this.setState({ pullToRefreshTriggered: true })
} else if (scrollTop > -10 && this.props.onReload && this.state.pullToRefreshTriggered) {
this.props.onReload()
this.setState({ pullToRefreshTriggered: false })
}
if (600 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) { if (600 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
this.props.onLoadMore(); this.props.onLoadMore();
} }
@ -267,7 +259,6 @@ class ScrollableList extends React.PureComponent {
ScrollableList.propTypes = { ScrollableList.propTypes = {
scrollKey: PropTypes.string.isRequired, scrollKey: PropTypes.string.isRequired,
onLoadMore: PropTypes.func, onLoadMore: PropTypes.func,
onReload: PropTypes.func,
isLoading: PropTypes.bool, isLoading: PropTypes.bool,
showLoading: PropTypes.bool, showLoading: PropTypes.bool,
hasMore: PropTypes.bool, hasMore: PropTypes.bool,

View File

@ -284,7 +284,6 @@ class StatusList extends ImmutablePureComponent {
isLoading={isLoading} isLoading={isLoading}
showLoading={(isLoading && statusIds.size === 0)} showLoading={(isLoading && statusIds.size === 0)}
onLoadMore={onLoadMore && this.handleLoadOlder} onLoadMore={onLoadMore && this.handleLoadOlder}
onReload={this.handleOnReload}
placeholderComponent={StatusPlaceholder} placeholderComponent={StatusPlaceholder}
placeholderCount={1} placeholderCount={1}
scrollKey={scrollKey} scrollKey={scrollKey}