about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/home_timeline/index.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-06-11 17:07:35 +0200
committerGitHub <noreply@github.com>2017-06-11 17:07:35 +0200
commit47bf7a8047ce59b899d147e4483168f9852eeb7c (patch)
tree79dd51ed84b1ed350cd754c8fca988dd6718a93a /app/javascript/mastodon/features/home_timeline/index.js
parent85d405c810a3bfc146c7901d770444419f32e46f (diff)
Fix #3665 - Refactor timelines reducer (#3686)
* Move ancestors/descendants out of timelines reducer

* Refactor timelines reducer

All types of timelines now have a flat structure and use the same
reducer functions and actions

* Reintroduce some missing behaviours

* Fix wrong import in reports

* Fix includes typo

* Fix issue related to "next" pagination in timelines and notifications

* Fix bug with timeline's initial state, expandNotifications
Diffstat (limited to 'app/javascript/mastodon/features/home_timeline/index.js')
-rw-r--r--app/javascript/mastodon/features/home_timeline/index.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/home_timeline/index.js b/app/javascript/mastodon/features/home_timeline/index.js
index 7439bf3a1..6d3968751 100644
--- a/app/javascript/mastodon/features/home_timeline/index.js
+++ b/app/javascript/mastodon/features/home_timeline/index.js
@@ -1,5 +1,6 @@
 import React from 'react';
 import { connect } from 'react-redux';
+import { expandHomeTimeline } from '../../actions/timelines';
 import PropTypes from 'prop-types';
 import StatusListContainer from '../ui/containers/status_list_container';
 import Column from '../../components/column';
@@ -52,6 +53,10 @@ class HomeTimeline extends React.PureComponent {
     this.column = c;
   }
 
+  handleLoadMore = () => {
+    this.props.dispatch(expandHomeTimeline());
+  }
+
   render () {
     const { intl, hasUnread, hasFollows, columnId, multiColumn } = this.props;
     const pinned = !!columnId;
@@ -80,10 +85,10 @@ class HomeTimeline extends React.PureComponent {
         </ColumnHeader>
 
         <StatusListContainer
-          {...this.props}
           trackScroll={!pinned}
           scrollKey={`home_timeline-${columnId}`}
-          type='home'
+          loadMore={this.handleLoadMore}
+          timelineId='home'
           emptyMessage={emptyMessage}
         />
       </Column>