1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Fix timelines loading bug

This commit is contained in:
Eugen Rochko 2016-12-12 14:39:18 +01:00
parent 6d1066fe61
commit 908fcf83c6
3 changed files with 3 additions and 3 deletions

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}`;
}

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
},

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) => {