Revert "Move queueStore update to GraphView (#1679)" (#1701)

This reverts commit c8d5a6f154.
This commit is contained in:
Chenlei Hu
2024-11-26 10:08:42 -08:00
committed by GitHub
parent 4a182014e1
commit d0ad4af51c
2 changed files with 10 additions and 9 deletions

View File

@@ -285,6 +285,11 @@ 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)
@@ -347,11 +352,12 @@ const toggleImageFit = () => {
}
onMounted(() => {
api.addEventListener('status', updateVisibleTasks)
api.addEventListener('status', onStatus)
queueStore.update()
})
onUnmounted(() => {
api.removeEventListener('status', updateVisibleTasks)
api.removeEventListener('status', onStatus)
})
// Watch for changes in allTasks and reset visibleTasks if necessary