Commit 3988f686 authored by Pooya Parsa's avatar Pooya Parsa

perf: don't priorotize already fetched feeds

parent 4a2046ea
...@@ -32,6 +32,10 @@ export default { ...@@ -32,6 +32,10 @@ export default {
// ================================================= // =================================================
actions: { actions: {
FETCH_FEED({ commit, state }, { feed, page, prefetch }) { 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 (!prefetch) {
if (this.feedCancelSource) { if (this.feedCancelSource) {
this.feedCancelSource.cancel( this.feedCancelSource.cancel(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment