about summary refs log tree commit diff
path: root/app/assets
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-17 01:23:41 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-17 01:23:41 +0200
commitb5c6d00afae53dca1b6abd405556d58557ea7e1a (patch)
tree02e012680fbec935f39d5ea576b8bdcf6157837f /app/assets
parent13ee88926d914bfa1edb6c9c8109e121f5cf9582 (diff)
Fix #99 - public timeline not just reblogs, fix #98 infinite scrolling issues
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/components/actions/accounts.jsx7
-rw-r--r--app/assets/javascripts/components/features/account_timeline/index.jsx2
2 files changed, 5 insertions, 4 deletions
diff --git a/app/assets/javascripts/components/actions/accounts.jsx b/app/assets/javascripts/components/actions/accounts.jsx
index eeec405d1..4847c37e2 100644
--- a/app/assets/javascripts/components/actions/accounts.jsx
+++ b/app/assets/javascripts/components/actions/accounts.jsx
@@ -1,5 +1,6 @@
-import api   from '../api'
-import axios from 'axios';
+import api       from '../api'
+import axios     from 'axios';
+import Immutable from 'immutable';
 
 export const ACCOUNT_SET_SELF = 'ACCOUNT_SET_SELF';
 
@@ -66,7 +67,7 @@ export function fetchAccountTimeline(id) {
 
 export function expandAccountTimeline(id) {
   return (dispatch, getState) => {
-    const lastId = getState().getIn(['timelines', 'accounts_timelines', id]).last();
+    const lastId = getState().getIn(['timelines', 'accounts_timelines', id], Immutable.List()).last();
 
     dispatch(expandAccountTimelineRequest(id));
 
diff --git a/app/assets/javascripts/components/features/account_timeline/index.jsx b/app/assets/javascripts/components/features/account_timeline/index.jsx
index 9c226e6f9..0b3d641d5 100644
--- a/app/assets/javascripts/components/features/account_timeline/index.jsx
+++ b/app/assets/javascripts/components/features/account_timeline/index.jsx
@@ -66,7 +66,7 @@ const AccountTimeline = React.createClass({
   },
 
   handleScrollToBottom () {
-    this.props.dispatch(expandAccountTimeline(this.props.account.get('id')));
+    this.props.dispatch(expandAccountTimeline(Number(this.props.params.accountId)));
   },
 
   render () {