From 3b8cd385f2e4039a3a5e23a5c2d8984fe7e64bc6 Mon Sep 17 00:00:00 2001 From: Thomas Hutterer <thutterer@gitlab.com> Date: Mon, 30 Dec 2024 15:06:38 +0100 Subject: [PATCH] Rename updatePid to updateTimeoutId for clarity --- .../javascripts/todos/components/todos_app.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/todos/components/todos_app.vue b/app/assets/javascripts/todos/components/todos_app.vue index 7d3ab94d4d9c6..1d5a911caedc8 100644 --- a/app/assets/javascripts/todos/components/todos_app.vue +++ b/app/assets/javascripts/todos/components/todos_app.vue @@ -55,7 +55,7 @@ export default { }, data() { return { - updatePid: null, + updateTimeoutId: null, needsRefresh: false, cursor: { first: DEFAULT_PAGE_SIZE, @@ -228,18 +228,18 @@ export default { this.showSpinnerWhileLoading = true; }, startedInteracting() { - clearTimeout(this.updatePid); + clearTimeout(this.updateTimeoutId); }, stoppedInteracting() { if (!this.needsRefresh) { return; } - if (this.updatePid) { - clearTimeout(this.updatePid); + if (this.updateTimeoutId) { + clearTimeout(this.updateTimeoutId); } - this.updatePid = setTimeout(() => { + this.updateTimeoutId = setTimeout(() => { /* We double-check needsRefresh or whether a query is already running @@ -247,7 +247,7 @@ export default { if (this.needsRefresh && !this.$apollo.queries.todos.loading) { this.updateAllQueries(false); } - this.updatePid = null; + this.updateTimeoutId = null; }, TODO_WAIT_BEFORE_RELOAD); }, }, -- GitLab