mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix canvas staging area
Missed some of the `imageUpdated` stuff
This commit is contained in:
parent
bab3a9504e
commit
a6c615a98c
@ -19,8 +19,8 @@ export const addImageMetadataReceivedFulfilledListener = () => {
|
||||
) {
|
||||
dispatch(
|
||||
imageUpdated({
|
||||
imageName: image.image_name,
|
||||
requestBody: { is_intermediate: false },
|
||||
image_name: image.image_name,
|
||||
is_intermediate: image.is_intermediate,
|
||||
})
|
||||
);
|
||||
} else if (image.is_intermediate) {
|
||||
|
@ -11,14 +11,12 @@ export const addStagingAreaImageSavedListener = () => {
|
||||
startAppListening({
|
||||
actionCreator: stagingAreaImageSaved,
|
||||
effect: async (action, { dispatch, getState, take }) => {
|
||||
const { image_name } = action.payload;
|
||||
const { imageName } = action.payload;
|
||||
|
||||
dispatch(
|
||||
imageUpdated({
|
||||
imageName: image_name,
|
||||
requestBody: {
|
||||
is_intermediate: false,
|
||||
},
|
||||
image_name: imageName,
|
||||
is_intermediate: false,
|
||||
})
|
||||
);
|
||||
|
||||
@ -26,7 +24,7 @@ export const addStagingAreaImageSavedListener = () => {
|
||||
(action) =>
|
||||
(imageUpdated.fulfilled.match(action) ||
|
||||
imageUpdated.rejected.match(action)) &&
|
||||
action.meta.arg.imageName === image_name
|
||||
action.meta.arg.image_name === imageName
|
||||
);
|
||||
|
||||
if (imageUpdated.rejected.match(imageUpdatedAction)) {
|
||||
|
@ -175,7 +175,11 @@ const IAICanvasStagingAreaToolbar = () => {
|
||||
aria-label={t('unifiedCanvas.saveToGallery')}
|
||||
icon={<FaSave />}
|
||||
onClick={() =>
|
||||
dispatch(stagingAreaImageSaved(currentStagingAreaImage.image))
|
||||
dispatch(
|
||||
stagingAreaImageSaved({
|
||||
imageName: currentStagingAreaImage.imageName,
|
||||
})
|
||||
)
|
||||
}
|
||||
colorScheme="accent"
|
||||
/>
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
import { ImageDTO } from 'services/api/types';
|
||||
|
||||
export const canvasSavedToGallery = createAction('canvas/canvasSavedToGallery');
|
||||
|
||||
@ -13,6 +12,6 @@ export const canvasDownloadedAsImage = createAction(
|
||||
|
||||
export const canvasMerged = createAction('canvas/canvasMerged');
|
||||
|
||||
export const stagingAreaImageSaved = createAction<ImageDTO>(
|
||||
export const stagingAreaImageSaved = createAction<{ imageName: string }>(
|
||||
'canvas/stagingAreaImageSaved'
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user