Skip to content

Commit

Permalink
perf: don't priorotize already fetched feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Mar 25, 2018
1 parent 4a2046e commit 3988f68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions store/index.js
Expand Up @@ -32,6 +32,10 @@ export default {
// =================================================
actions: {
FETCH_FEED({ commit, state }, { feed, page, prefetch }) {
// Don't priorotize already fetched feeds
if (state.feeds[feed][page] && state.feeds[feed][page].length) {
prefetch = true
}
if (!prefetch) {
if (this.feedCancelSource) {
this.feedCancelSource.cancel(
Expand Down

0 comments on commit 3988f68

Please sign in to comment.