about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/account_timeline/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/mastodon/features/account_timeline/index.js')
-rw-r--r--app/javascript/mastodon/features/account_timeline/index.js17
1 files changed, 7 insertions, 10 deletions
diff --git a/app/javascript/mastodon/features/account_timeline/index.js b/app/javascript/mastodon/features/account_timeline/index.js
index 299f9ad5c..1aab8f130 100644
--- a/app/javascript/mastodon/features/account_timeline/index.js
+++ b/app/javascript/mastodon/features/account_timeline/index.js
@@ -2,11 +2,8 @@ import React from 'react';
 import { connect } from 'react-redux';
 import ImmutablePropTypes from 'react-immutable-proptypes';
 import PropTypes from 'prop-types';
-import {
-  fetchAccount,
-  fetchAccountTimeline,
-  expandAccountTimeline,
-} from '../../actions/accounts';
+import { fetchAccount } from '../../actions/accounts';
+import { refreshAccountTimeline, expandAccountTimeline } from '../../actions/timelines';
 import StatusList from '../../components/status_list';
 import LoadingIndicator from '../../components/loading_indicator';
 import Column from '../ui/components/column';
@@ -16,9 +13,9 @@ import Immutable from 'immutable';
 import ImmutablePureComponent from 'react-immutable-pure-component';
 
 const mapStateToProps = (state, props) => ({
-  statusIds: state.getIn(['timelines', 'accounts_timelines', Number(props.params.accountId), 'items'], Immutable.List()),
-  isLoading: state.getIn(['timelines', 'accounts_timelines', Number(props.params.accountId), 'isLoading']),
-  hasMore: !!state.getIn(['timelines', 'accounts_timelines', Number(props.params.accountId), 'next']),
+  statusIds: state.getIn(['timelines', `account:${Number(props.params.accountId)}`, 'items'], Immutable.List()),
+  isLoading: state.getIn(['timelines', `account:${Number(props.params.accountId)}`, 'isLoading']),
+  hasMore: !!state.getIn(['timelines', `account:${Number(props.params.accountId)}`, 'next']),
   me: state.getIn(['meta', 'me']),
 });
 
@@ -35,13 +32,13 @@ class AccountTimeline extends ImmutablePureComponent {
 
   componentWillMount () {
     this.props.dispatch(fetchAccount(Number(this.props.params.accountId)));
-    this.props.dispatch(fetchAccountTimeline(Number(this.props.params.accountId)));
+    this.props.dispatch(refreshAccountTimeline(Number(this.props.params.accountId)));
   }
 
   componentWillReceiveProps (nextProps) {
     if (nextProps.params.accountId !== this.props.params.accountId && nextProps.params.accountId) {
       this.props.dispatch(fetchAccount(Number(nextProps.params.accountId)));
-      this.props.dispatch(fetchAccountTimeline(Number(nextProps.params.accountId)));
+      this.props.dispatch(refreshAccountTimeline(Number(nextProps.params.accountId)));
     }
   }