mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix gallery auto switch
This commit is contained in:
parent
f88ccabe30
commit
17164a37a8
@ -2,13 +2,11 @@ import { addImageToStagingArea } from 'features/canvas/store/canvasSlice';
|
|||||||
import { startAppListening } from '../..';
|
import { startAppListening } from '../..';
|
||||||
import { log } from 'app/logging/useLogger';
|
import { log } from 'app/logging/useLogger';
|
||||||
import { invocationComplete } from 'services/events/actions';
|
import { invocationComplete } from 'services/events/actions';
|
||||||
import {
|
import { imageMetadataReceived } from 'services/thunks/image';
|
||||||
imageMetadataReceived,
|
|
||||||
imageUrlsReceived,
|
|
||||||
} from 'services/thunks/image';
|
|
||||||
import { sessionCanceled } from 'services/thunks/session';
|
import { sessionCanceled } from 'services/thunks/session';
|
||||||
import { isImageOutput } from 'services/types/guards';
|
import { isImageOutput } from 'services/types/guards';
|
||||||
import { progressImageSet } from 'features/system/store/systemSlice';
|
import { progressImageSet } from 'features/system/store/systemSlice';
|
||||||
|
import { imageSelected } from 'features/gallery/store/gallerySlice';
|
||||||
|
|
||||||
const moduleLog = log.child({ namespace: 'socketio' });
|
const moduleLog = log.child({ namespace: 'socketio' });
|
||||||
const nodeDenylist = ['dataURL_image'];
|
const nodeDenylist = ['dataURL_image'];
|
||||||
@ -46,6 +44,14 @@ export const addInvocationCompleteListener = () => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const [{ payload: imageDTO }] = await take(
|
||||||
|
imageMetadataReceived.fulfilled.match
|
||||||
|
);
|
||||||
|
|
||||||
|
if (getState().gallery.shouldAutoSwitchToNewImages) {
|
||||||
|
dispatch(imageSelected(imageDTO));
|
||||||
|
}
|
||||||
|
|
||||||
// Handle canvas image
|
// Handle canvas image
|
||||||
if (
|
if (
|
||||||
graph_execution_state_id ===
|
graph_execution_state_id ===
|
||||||
|
Loading…
x
Reference in New Issue
Block a user