Skip to content

Commit

Permalink
Not every FEED_GENERAL_LOAD finishes with FEED_GENERAL_SET/FEED_GENER…
Browse files Browse the repository at this point in the history
…AL_LOAD_FAILED.
  • Loading branch information
smelamud committed Jul 18, 2022
1 parent 7753626 commit a05a899
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/state/feeds/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ export default (state: FeedsState = initialState, action: WithContext<ClientActi

case FEED_GENERAL_LOAD: {
const {feedName} = action.payload;
return getFeed(state, feedName).istate
.set([feedName, "loadingGeneral"], true)
.value();
const {istate, feed} = getFeed(state, feedName);
if (!feed.loadedGeneral) {
istate.set([feedName, "loadingGeneral"], true);
}
return istate.value();
}

case FEED_GENERAL_LOAD_FAILED: {
Expand Down

0 comments on commit a05a899

Please sign in to comment.