Skip to content

Commit 6c01d6d

Browse files
authored
Fix home timeline perpetually reloading when empty (mastodon#10130)
Regression from mastodon#6876
1 parent fef1931 commit 6c01d6d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

app/javascript/mastodon/features/home_timeline/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const messages = defineMessages({
1616

1717
const mapStateToProps = state => ({
1818
hasUnread: state.getIn(['timelines', 'home', 'unread']) > 0,
19-
isPartial: state.getIn(['timelines', 'home', 'items', 0], null) === null,
19+
isPartial: state.getIn(['timelines', 'home', 'isPartial']),
2020
});
2121

2222
export default @connect(mapStateToProps)

app/javascript/mastodon/reducers/timelines.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const initialTimeline = ImmutableMap({
2929
const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial, isLoadingRecent) => {
3030
return state.update(timeline, initialTimeline, map => map.withMutations(mMap => {
3131
mMap.set('isLoading', false);
32+
mMap.set('isPartial', isPartial);
33+
3234
if (!next && !isLoadingRecent) mMap.set('hasMore', false);
3335

3436
if (!statuses.isEmpty()) {

0 commit comments

Comments
 (0)