Skip to content

Commit

Permalink
timeline: fix runaway loader values
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <radialapps@gmail.com>
  • Loading branch information
pulsejet committed Nov 15, 2023
1 parent eb2263d commit 60e080e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/components/Timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -389,21 +389,11 @@ export default defineComponent({
this.refs.selectionManager.clear();
this.fetchDayQueue = []; // reset queue
// Fetch days and reset loading
this.updateLoading(1);
const doFetch = async () => {
try {
await this.fetchDays(true);
} finally {
this.updateLoading(-1);
}
};
// Fetch days
if (sync) {
doFetch();
await this.fetchDays(true);
} else {
utils.setRenewingTimeout(this, '_softRefreshInternalTimer', doFetch, 30);
utils.setRenewingTimeout(this, '_softRefreshInternalTimer', () => this.fetchDays(true), 30);
}
},
Expand Down

0 comments on commit 60e080e

Please sign in to comment.