Skip to content
代码片段 群组 项目
提交 3b8cd385 编辑于 作者: Thomas Hutterer's avatar Thomas Hutterer
浏览文件

Rename updatePid to updateTimeoutId for clarity

上级 8e63b61b
No related branches found
No related tags found
无相关合并请求
......@@ -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);
},
},
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册