mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(ui): clear last progress event on invocation/queue item complete
Fixes an issue where indeterminate progress wasn't shown.
This commit is contained in:
@@ -10,6 +10,7 @@ import { boardsApi } from 'services/api/endpoints/boards';
|
||||
import { getImageDTO, imagesApi } from 'services/api/endpoints/images';
|
||||
import type { ImageDTO, S } from 'services/api/types';
|
||||
import { getCategories, getListImagesUrl } from 'services/api/util';
|
||||
import { $lastProgressEvent } from 'services/events/stores';
|
||||
|
||||
const log = logger('events');
|
||||
|
||||
@@ -159,5 +160,7 @@ export const buildOnInvocationComplete = (getState: () => RootState, dispatch: A
|
||||
} else {
|
||||
await handleOriginOther(data);
|
||||
}
|
||||
|
||||
$lastProgressEvent.set(null);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -423,6 +423,9 @@ export const setEventListeners = ({ socket, store, setIsConnected }: SetEventLis
|
||||
/>
|
||||
),
|
||||
});
|
||||
} else if (status === 'completed' || status === 'failed' || status === 'canceled') {
|
||||
// If the queue item is completed, failed, or cancelled, we want to clear the last progress event
|
||||
$lastProgressEvent.set(null);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user