From 453230d774f84d58d8174fb17b1185d9a90668f6 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 3 Dec 2022 14:32:31 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=BD=91=E7=BB=9C=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E4=B8=8D=E6=B8=85=E7=A9=BA=E4=BB=AA=E8=A1=A8=E7=9B=98=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/store/actions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js index 03661f3a0..efa3b8f33 100644 --- a/resources/assets/js/store/actions.js +++ b/resources/assets/js/store/actions.js @@ -1319,15 +1319,15 @@ export default { // dispatch("getTasks", { complete: "no", - }).finally(_ => { - state.loadDashboardTasks = false; - // + }).then(_ => { const {today, overdue, all} = getters.dashboardTask; const newIds = today.filter(task => task._time >= time).map(({id}) => id) newIds.push(...overdue.filter(task => task._time >= time).map(({id}) => id)) newIds.push(...all.filter(task => task._time >= time).map(({id}) => id)) newIds.push(...getters.assistTask.filter(task => task._time >= time).map(({id}) => id)) dispatch("forgetTask", currentIds.filter(v => newIds.indexOf(v) == -1)) + }).finally(_ => { + state.loadDashboardTasks = false; }) },