From 880dad7b5ab8e4e1e7ffc85947fb067c46a8193e Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Wed, 4 Nov 2020 21:05:34 -0600 Subject: [PATCH] Removed onReload and pull to refresh from StatusList, ScrollableList MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Removed: - onReload and pull to refresh from StatusList, ScrollableList --- app/javascript/gabsocial/components/scrollable_list.js | 9 --------- app/javascript/gabsocial/components/status_list.js | 1 - 2 files changed, 10 deletions(-) diff --git a/app/javascript/gabsocial/components/scrollable_list.js b/app/javascript/gabsocial/components/scrollable_list.js index 47a89757..ac9c1ab4 100644 --- a/app/javascript/gabsocial/components/scrollable_list.js +++ b/app/javascript/gabsocial/components/scrollable_list.js @@ -17,7 +17,6 @@ class ScrollableList extends React.PureComponent { } state = { - pullToRefreshTriggered: false, 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 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) { this.props.onLoadMore(); } @@ -267,7 +259,6 @@ class ScrollableList extends React.PureComponent { ScrollableList.propTypes = { scrollKey: PropTypes.string.isRequired, onLoadMore: PropTypes.func, - onReload: PropTypes.func, isLoading: PropTypes.bool, showLoading: PropTypes.bool, hasMore: PropTypes.bool, diff --git a/app/javascript/gabsocial/components/status_list.js b/app/javascript/gabsocial/components/status_list.js index f6e8a894..9bbaa2fe 100644 --- a/app/javascript/gabsocial/components/status_list.js +++ b/app/javascript/gabsocial/components/status_list.js @@ -284,7 +284,6 @@ class StatusList extends ImmutablePureComponent { isLoading={isLoading} showLoading={(isLoading && statusIds.size === 0)} onLoadMore={onLoadMore && this.handleLoadOlder} - onReload={this.handleOnReload} placeholderComponent={StatusPlaceholder} placeholderCount={1} scrollKey={scrollKey}