show whether data is updated after pull down

This commit is contained in:
MaysWind
2023-06-18 22:43:47 +08:00
parent 55ad7b2e81
commit eb2e2b0a26
15 changed files with 102 additions and 17 deletions
@@ -496,6 +496,7 @@ export default {
},
reload(done) {
const self = this;
const force = !!done;
let dispatchPromise = null;
if (self.query.chartDataType === self.allChartDataTypes.ExpenseByAccount.type ||
@@ -510,7 +511,7 @@ export default {
} else if (self.query.chartDataType === self.allChartDataTypes.AccountTotalAssets.type ||
self.query.chartDataType === self.allChartDataTypes.AccountTotalLiabilities.type) {
dispatchPromise = self.accountsStore.loadAllAccounts({
force: true
force: force
});
}
@@ -519,6 +520,10 @@ export default {
if (done) {
done();
}
if (force) {
self.$toast('Data has been updated');
}
}).catch(error => {
if (done) {
done();