Move queueStore update to GraphView (#1679)

This commit is contained in:
Chenlei Hu
2024-11-25 08:47:35 -08:00
committed by GitHub
parent 3708afaf21
commit c8d5a6f154
2 changed files with 9 additions and 10 deletions

View File

@@ -284,11 +284,6 @@ const confirmRemoveAll = (event: Event) => {
})
}
const onStatus = async () => {
await queueStore.update()
updateVisibleTasks()
}
const menu = ref(null)
const menuTargetTask = ref<TaskItemImpl | null>(null)
const menuTargetNode = ref<ComfyNode | null>(null)
@@ -351,12 +346,11 @@ const toggleImageFit = () => {
}
onMounted(() => {
api.addEventListener('status', onStatus)
queueStore.update()
api.addEventListener('status', updateVisibleTasks)
})
onUnmounted(() => {
api.removeEventListener('status', onStatus)
api.removeEventListener('status', updateVisibleTasks)
})
// Watch for changes in allTasks and reset visibleTasks if necessary