timeline: fix runaway loader values

Signed-off-by: Varun Patil <radialapps@gmail.com>
pulsejet/aio-hw-docs
Varun Patil 2023-11-15 14:11:30 -08:00
parent eb2263d3ea
commit 60e080ee64
1 changed files with 2 additions and 12 deletions

View File

@ -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);
}
},