Browse Source

Fix timelines loading bug

closed-social-glitch-2
Eugen Rochko 7 years ago
parent
commit
908fcf83c6
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      app/assets/javascripts/components/actions/timelines.jsx
  2. +1
    -1
      app/assets/javascripts/components/features/account/components/action_bar.jsx
  3. +1
    -1
      app/assets/javascripts/components/reducers/timelines.jsx

+ 1
- 1
app/assets/javascripts/components/actions/timelines.jsx View File

@ -67,7 +67,7 @@ export function refreshTimeline(timeline, id = null) {
let params = '';
let path = timeline;
if (newestId !== null) {
if (newestId !== null && getState().getIn(['timelines', timeline, 'loaded'])) {
params = `?since_id=${newestId}`;
}

+ 1
- 1
app/assets/javascripts/components/features/account/components/action_bar.jsx View File

@ -39,7 +39,7 @@ const ActionBar = React.createClass({
propTypes: {
account: ImmutablePropTypes.map.isRequired,
me: React.PropTypes.number.isRequired,
onFollow: React.PropTypes.func.isRequired,
onFollow: React.PropTypes.func,
onBlock: React.PropTypes.func.isRequired,
onMention: React.PropTypes.func.isRequired
},

+ 1
- 1
app/assets/javascripts/components/reducers/timelines.jsx View File

@ -83,7 +83,7 @@ const normalizeTimeline = (state, timeline, statuses, replace = false) => {
state = state.setIn([timeline, 'loaded'], true);
return state.updateIn([timeline, 'items'], Immutable.List(), list => (loaded ? list.unshift(...ids) : list.push(...ids)));
return state.updateIn([timeline, 'items'], Immutable.List(), list => (loaded ? list.unshift(...ids) : ids));
};
const appendNormalizedTimeline = (state, timeline, statuses) => {

Loading…
Cancel
Save