From 3988f686108d16acfc37d52173bad34293fcba90 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sun, 25 Mar 2018 17:46:24 +0430 Subject: [PATCH] perf: don't priorotize already fetched feeds --- store/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/store/index.js b/store/index.js index 4247a20..374fe3d 100644 --- a/store/index.js +++ b/store/index.js @@ -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(