From 6d89edc4f772b10b61f9747482a155666077f20b Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Tue, 20 Sep 2016 23:18:00 +0200
Subject: Fix #47 by renaming TIMELINE_SET action to TIMELINE_REFRESH_SUCCESS

---
 .../javascripts/components/containers/mastodon.jsx | 31 +++++++++++++---------
 1 file changed, 18 insertions(+), 13 deletions(-)

(limited to 'app/assets/javascripts/components/containers/mastodon.jsx')

diff --git a/app/assets/javascripts/components/containers/mastodon.jsx b/app/assets/javascripts/components/containers/mastodon.jsx
index ba6e568ac..5f691b4bc 100644
--- a/app/assets/javascripts/components/containers/mastodon.jsx
+++ b/app/assets/javascripts/components/containers/mastodon.jsx
@@ -1,15 +1,20 @@
-import { Provider }                                                          from 'react-redux';
-import configureStore                                                        from '../store/configureStore';
-import { setTimeline, updateTimeline, deleteFromTimelines, refreshTimeline } from '../actions/timelines';
-import { setAccessToken }                                                    from '../actions/meta';
-import { setAccountSelf }                                                    from '../actions/accounts';
-import PureRenderMixin                                                       from 'react-addons-pure-render-mixin';
-import { Router, Route, hashHistory }                                        from 'react-router';
-import Account                                                               from '../features/account';
-import Settings                                                              from '../features/settings';
-import Status                                                                from '../features/status';
-import Subscriptions                                                         from '../features/subscriptions';
-import UI                                                                    from '../features/ui';
+import { Provider }                   from 'react-redux';
+import configureStore                 from '../store/configureStore';
+import {
+  refreshTimelineSuccess,
+  updateTimeline,
+  deleteFromTimelines,
+  refreshTimeline
+}                                     from '../actions/timelines';
+import { setAccessToken }             from '../actions/meta';
+import { setAccountSelf }             from '../actions/accounts';
+import PureRenderMixin                from 'react-addons-pure-render-mixin';
+import { Router, Route, hashHistory } from 'react-router';
+import Account                        from '../features/account';
+import Settings                       from '../features/settings';
+import Status                         from '../features/status';
+import Subscriptions                  from '../features/subscriptions';
+import UI                             from '../features/ui';
 
 const store = configureStore();
 
@@ -29,7 +34,7 @@ const Mastodon = React.createClass({
 
     for (var timelineType in this.props.timelines) {
       if (this.props.timelines.hasOwnProperty(timelineType)) {
-        store.dispatch(setTimeline(timelineType, JSON.parse(this.props.timelines[timelineType])));
+        store.dispatch(refreshTimelineSuccess(timelineType, JSON.parse(this.props.timelines[timelineType])));
       }
     }
 
-- 
cgit 

