File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
invokeai/frontend/web/src/features/gallery/store Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 11import type { PayloadAction } from '@reduxjs/toolkit' ;
22import { createSlice , isAnyOf } from '@reduxjs/toolkit' ;
33import type { PersistConfig , RootState } from 'app/store/store' ;
4+ import { rgLayerAdded } from 'features/controlLayers/store/controlLayersSlice' ;
45import { setActiveTab } from 'features/ui/store/uiSlice' ;
56import { uniqBy } from 'lodash-es' ;
67import { boardsApi } from 'services/api/endpoints/boards' ;
@@ -89,6 +90,9 @@ export const gallerySlice = createSlice({
8990 builder . addCase ( setActiveTab , ( state ) => {
9091 state . isImageViewerOpen = false ;
9192 } ) ;
93+ builder . addCase ( rgLayerAdded , ( state ) => {
94+ state . isImageViewerOpen = false ;
95+ } ) ;
9296 builder . addMatcher ( isAnyBoardDeleted , ( state , action ) => {
9397 const deletedBoardId = action . meta . arg . originalArgs ;
9498 if ( deletedBoardId === state . selectedBoardId ) {
You can’t perform that action at this time.
0 commit comments