Only sync contributions if loaded from cache

This commit is contained in:
2020-05-29 20:55:19 +02:00
parent 63dd5430bc
commit c54d754c89
2 changed files with 11 additions and 5 deletions
+5 -3
View File
@@ -24,12 +24,14 @@ export default Route.extend({
this.kredits.addContractEventHandlers();
})
.then(() => {
if (this.kredits.contributorsNeedFetch) {
if (this.kredits.contributorsNeedSync) {
schedule('afterRender', this.kredits.syncContributors,
this.kredits.syncContributors.perform);
}
schedule('afterRender', this.kredits.syncContributions,
this.kredits.syncContributions.perform);
if (this.kredits.contributionsNeedSync) {
schedule('afterRender', this.kredits.syncContributions,
this.kredits.syncContributions.perform);
}
});
}
});