about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/community_timeline/index.js
diff options
context:
space:
mode:
authorSpencer Alves <impiaaa@gmail.com>2018-05-31 21:33:16 -0700
committerSpencer Alves <impiaaa@gmail.com>2018-05-31 21:33:16 -0700
commit7d2e6429c27c5ddc8ef3d2366c44329092e07f77 (patch)
tree7cfd2035f69616a369b2f3762ce9cefe61c2bd22 /app/javascript/flavours/glitch/features/community_timeline/index.js
parentf2ff167c1a8df9b2521d33fcca15b8d5c67c50b1 (diff)
parente396fbfe3bf4d2a404e78e73cff1a609dd0a9bfb (diff)
Merge branch 'glitch' into thread-icon
Diffstat (limited to 'app/javascript/flavours/glitch/features/community_timeline/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/community_timeline/index.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/javascript/flavours/glitch/features/community_timeline/index.js b/app/javascript/flavours/glitch/features/community_timeline/index.js
index 55355414f..b5843ca16 100644
--- a/app/javascript/flavours/glitch/features/community_timeline/index.js
+++ b/app/javascript/flavours/glitch/features/community_timeline/index.js
@@ -4,10 +4,7 @@ import PropTypes from 'prop-types';
 import StatusListContainer from 'flavours/glitch/features/ui/containers/status_list_container';
 import Column from 'flavours/glitch/components/column';
 import ColumnHeader from 'flavours/glitch/components/column_header';
-import {
-  refreshCommunityTimeline,
-  expandCommunityTimeline,
-} from 'flavours/glitch/actions/timelines';
+import { expandCommunityTimeline } from 'flavours/glitch/actions/timelines';
 import { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/columns';
 import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
 import ColumnSettingsContainer from './containers/column_settings_container';
@@ -55,7 +52,7 @@ export default class CommunityTimeline extends React.PureComponent {
   componentDidMount () {
     const { dispatch } = this.props;
 
-    dispatch(refreshCommunityTimeline());
+    dispatch(expandCommunityTimeline());
     this.disconnect = dispatch(connectCommunityStream());
   }
 
@@ -70,8 +67,8 @@ export default class CommunityTimeline extends React.PureComponent {
     this.column = c;
   }
 
-  handleLoadMore = () => {
-    this.props.dispatch(expandCommunityTimeline());
+  handleLoadMore = maxId => {
+    this.props.dispatch(expandCommunityTimeline({ maxId }));
   }
 
   render () {
@@ -97,7 +94,7 @@ export default class CommunityTimeline extends React.PureComponent {
           trackScroll={!pinned}
           scrollKey={`community_timeline-${columnId}`}
           timelineId='community'
-          loadMore={this.handleLoadMore}
+          onLoadMore={this.handleLoadMore}
           emptyMessage={<FormattedMessage id='empty_column.community' defaultMessage='The local timeline is empty. Write something publicly to get the ball rolling!' />}
         />
       </Column>