mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
[bugfix] Fix queue not updating with completed task images (#4936)
Co-authored-by: Jennifer Weber <weberjc@MacBookPro.lan>
This commit is contained in:
@@ -189,6 +189,10 @@ const onStatus = async (e: CustomEvent<StatusWsMessageStatus>) => {
|
|||||||
await queueStore.update()
|
await queueStore.update()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onExecutionSuccess = async () => {
|
||||||
|
await queueStore.update()
|
||||||
|
}
|
||||||
|
|
||||||
const reconnectingMessage: ToastMessageOptions = {
|
const reconnectingMessage: ToastMessageOptions = {
|
||||||
severity: 'error',
|
severity: 'error',
|
||||||
summary: t('g.reconnecting')
|
summary: t('g.reconnecting')
|
||||||
@@ -214,6 +218,7 @@ const onReconnected = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
api.addEventListener('status', onStatus)
|
api.addEventListener('status', onStatus)
|
||||||
|
api.addEventListener('execution_success', onExecutionSuccess)
|
||||||
api.addEventListener('reconnecting', onReconnecting)
|
api.addEventListener('reconnecting', onReconnecting)
|
||||||
api.addEventListener('reconnected', onReconnected)
|
api.addEventListener('reconnected', onReconnected)
|
||||||
executionStore.bindExecutionEvents()
|
executionStore.bindExecutionEvents()
|
||||||
@@ -227,6 +232,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
api.removeEventListener('status', onStatus)
|
api.removeEventListener('status', onStatus)
|
||||||
|
api.removeEventListener('execution_success', onExecutionSuccess)
|
||||||
api.removeEventListener('reconnecting', onReconnecting)
|
api.removeEventListener('reconnecting', onReconnecting)
|
||||||
api.removeEventListener('reconnected', onReconnected)
|
api.removeEventListener('reconnected', onReconnected)
|
||||||
executionStore.unbindExecutionEvents()
|
executionStore.unbindExecutionEvents()
|
||||||
|
|||||||
Reference in New Issue
Block a user