mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): restore missing galleryImageClicked reducer
This commit is contained in:
parent
183945077d
commit
54e46faa54
@ -1,6 +1,7 @@
|
||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import type { PersistConfig, RootState } from 'app/store/store';
|
||||
import { galleryImageClicked } from 'features/gallery/store/gallerySlice';
|
||||
import { initialImageChanged } from 'features/parameters/store/generationSlice';
|
||||
|
||||
import type { InvokeTabName } from './tabMap';
|
||||
@ -49,6 +50,14 @@ export const uiSlice = createSlice({
|
||||
builder.addCase(initialImageChanged, (state) => {
|
||||
state.activeTab = 'img2img';
|
||||
});
|
||||
|
||||
builder.addCase(galleryImageClicked, (state) => {
|
||||
// When a gallery image is clicked and we are in progress mode, switch to image mode.
|
||||
// This is not the same as the gallery _selection_ being changed.
|
||||
if (state.viewerMode === 'progress') {
|
||||
state.viewerMode = 'image';
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user