about summary refs log tree commit diff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-31 22:34:33 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-31 22:35:38 +0100
commitbf60f2898d8c9dcf880bd14c187caf90b9549a2a (patch)
tree75a887258dc5e8247cd22091f1631a43efa1597c /app/assets/javascripts
parent8ef79d8dc9de33975bd793587020a259ef020276 (diff)
Fix #529 - Make hashtag timelines show conversations, fix hashtag loading in the UI
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/components/actions/timelines.jsx9
-rw-r--r--app/assets/javascripts/components/features/account_timeline/index.jsx5
-rw-r--r--app/assets/javascripts/components/features/followers/index.jsx1
-rw-r--r--app/assets/javascripts/components/features/following/index.jsx1
4 files changed, 10 insertions, 6 deletions
diff --git a/app/assets/javascripts/components/actions/timelines.jsx b/app/assets/javascripts/components/actions/timelines.jsx
index 29a060e87..1531b89a3 100644
--- a/app/assets/javascripts/components/actions/timelines.jsx
+++ b/app/assets/javascripts/components/actions/timelines.jsx
@@ -74,7 +74,7 @@ export function refreshTimeline(timeline, id = null) {
     let path        = timeline;
     let skipLoading = false;
 
-    if (newestId !== null && getState().getIn(['timelines', timeline, 'loaded'])) {
+    if (newestId !== null && getState().getIn(['timelines', timeline, 'loaded']) && (id === null || getState().getIn(['timelines', timeline, 'id']) === id)) {
       params      = `?since_id=${newestId}`;
       skipLoading = true;
     }
@@ -112,7 +112,7 @@ export function expandTimeline(timeline, id = null) {
       return;
     }
 
-    dispatch(expandTimelineRequest(timeline));
+    dispatch(expandTimelineRequest(timeline, id));
 
     let path = timeline;
 
@@ -133,10 +133,11 @@ export function expandTimeline(timeline, id = null) {
   };
 };
 
-export function expandTimelineRequest(timeline) {
+export function expandTimelineRequest(timeline, id) {
   return {
     type: TIMELINE_EXPAND_REQUEST,
-    timeline
+    timeline,
+    id
   };
 };
 
diff --git a/app/assets/javascripts/components/features/account_timeline/index.jsx b/app/assets/javascripts/components/features/account_timeline/index.jsx
index 6613600cc..349510295 100644
--- a/app/assets/javascripts/components/features/account_timeline/index.jsx
+++ b/app/assets/javascripts/components/features/account_timeline/index.jsx
@@ -11,9 +11,10 @@ import LoadingIndicator from '../../components/loading_indicator';
 import Column from '../ui/components/column';
 import HeaderContainer from './containers/header_container';
 import ColumnBackButton from '../../components/column_back_button';
+import Immutable from 'immutable';
 
 const mapStateToProps = (state, props) => ({
-  statusIds: state.getIn(['timelines', 'accounts_timelines', Number(props.params.accountId), 'items']),
+  statusIds: state.getIn(['timelines', 'accounts_timelines', Number(props.params.accountId), 'items'], Immutable.List()),
   isLoading: state.getIn(['timelines', 'accounts_timelines', Number(props.params.accountId), 'isLoading']),
   me: state.getIn(['meta', 'me'])
 });
@@ -49,7 +50,7 @@ const AccountTimeline = React.createClass({
   render () {
     const { statusIds, isLoading, me } = this.props;
 
-    if (!statusIds) {
+    if (!statusIds && isLoading) {
       return (
         <Column>
           <LoadingIndicator />
diff --git a/app/assets/javascripts/components/features/followers/index.jsx b/app/assets/javascripts/components/features/followers/index.jsx
index 1b9548c7e..bcadf6010 100644
--- a/app/assets/javascripts/components/features/followers/index.jsx
+++ b/app/assets/javascripts/components/features/followers/index.jsx
@@ -67,6 +67,7 @@ const Followers = React.createClass({
     return (
       <Column>
         <ColumnBackButton />
+
         <ScrollContainer scrollKey='followers'>
           <div className='scrollable' onScroll={this.handleScroll}>
             <div>
diff --git a/app/assets/javascripts/components/features/following/index.jsx b/app/assets/javascripts/components/features/following/index.jsx
index 2a799ac42..f67cc797f 100644
--- a/app/assets/javascripts/components/features/following/index.jsx
+++ b/app/assets/javascripts/components/features/following/index.jsx
@@ -67,6 +67,7 @@ const Following = React.createClass({
     return (
       <Column>
         <ColumnBackButton />
+
         <ScrollContainer scrollKey='following'>
           <div className='scrollable' onScroll={this.handleScroll}>
             <div>