feat(ui): only auto-add image to board if is not intermediate

This commit is contained in:
psychedelicious 2023-06-21 19:55:00 +10:00
parent abd6561140
commit 3c032c0767

View File

@ -41,15 +41,6 @@ export const addInvocationCompleteEventListener = () => {
if (isImageOutput(result) && !nodeDenylist.includes(node.type)) {
const { image_name } = result.image;
if (boardIdToAddTo) {
dispatch(
api.endpoints.addImageToBoard.initiate({
board_id: boardIdToAddTo,
image_name,
})
);
}
// Get its metadata
dispatch(
imageMetadataReceived({
@ -69,6 +60,15 @@ export const addInvocationCompleteEventListener = () => {
dispatch(addImageToStagingArea(imageDTO));
}
if (boardIdToAddTo && !imageDTO.is_intermediate) {
dispatch(
api.endpoints.addImageToBoard.initiate({
board_id: boardIdToAddTo,
image_name,
})
);
}
dispatch(progressImageSet(null));
}
// pass along the socket event as an application action