fix(ui): switch to viewer if auto-switch is enabled

This commit is contained in:
psychedelicious 2024-05-07 07:39:44 +10:00 committed by Kent Keirsey
parent a9bf651c69
commit 67d6cf19c6

View File

@ -2,7 +2,12 @@ import { logger } from 'app/logging/logger';
import type { AppStartListening } from 'app/store/middleware/listenerMiddleware'; import type { AppStartListening } from 'app/store/middleware/listenerMiddleware';
import { parseify } from 'common/util/serialize'; import { parseify } from 'common/util/serialize';
import { addImageToStagingArea } from 'features/canvas/store/canvasSlice'; import { addImageToStagingArea } from 'features/canvas/store/canvasSlice';
import { boardIdSelected, galleryViewChanged, imageSelected } from 'features/gallery/store/gallerySlice'; import {
boardIdSelected,
galleryViewChanged,
imageSelected,
isImageViewerOpenChanged,
} from 'features/gallery/store/gallerySlice';
import { IMAGE_CATEGORIES } from 'features/gallery/store/types'; import { IMAGE_CATEGORIES } from 'features/gallery/store/types';
import { isImageOutput } from 'features/nodes/types/common'; import { isImageOutput } from 'features/nodes/types/common';
import { CANVAS_OUTPUT } from 'features/nodes/util/graph/constants'; import { CANVAS_OUTPUT } from 'features/nodes/util/graph/constants';
@ -101,6 +106,7 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi
} }
dispatch(imageSelected(imageDTO)); dispatch(imageSelected(imageDTO));
dispatch(isImageViewerOpenChanged(true));
} }
} }
} }