mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix incorrect boards endpoint matchers being used
Should fix some stale-data issues with the auto-adding of images to selected boards, and deleting images from boards.
This commit is contained in:
parent
8bacee115a
commit
13f25edb1e
@ -9,7 +9,7 @@ import { imageMetadataReceived } from 'services/api/thunks/image';
|
||||
import { sessionCanceled } from 'services/api/thunks/session';
|
||||
import { isImageOutput } from 'services/api/guards';
|
||||
import { progressImageSet } from 'features/system/store/systemSlice';
|
||||
import { api } from 'services/api';
|
||||
import { boardImagesApi } from 'services/api/endpoints/boardImages';
|
||||
|
||||
const moduleLog = log.child({ namespace: 'socketio' });
|
||||
const nodeDenylist = ['dataURL_image'];
|
||||
@ -61,7 +61,7 @@ export const addInvocationCompleteEventListener = () => {
|
||||
|
||||
if (boardIdToAddTo && !imageDTO.is_intermediate) {
|
||||
dispatch(
|
||||
api.endpoints.addImageToBoard.initiate({
|
||||
boardImagesApi.endpoints.addImageToBoard.initiate({
|
||||
board_id: boardIdToAddTo,
|
||||
image_name,
|
||||
})
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { PayloadAction, createSlice } from '@reduxjs/toolkit';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { api } from 'services/api';
|
||||
import { boardsApi } from 'services/api/endpoints/boards';
|
||||
|
||||
type BoardsState = {
|
||||
searchText: string;
|
||||
@ -29,7 +29,7 @@ const boardsSlice = createSlice({
|
||||
},
|
||||
extraReducers: (builder) => {
|
||||
builder.addMatcher(
|
||||
api.endpoints.deleteBoard.matchFulfilled,
|
||||
boardsApi.endpoints.deleteBoard.matchFulfilled,
|
||||
(state, action) => {
|
||||
if (action.meta.arg.originalArgs === state.selectedBoardId) {
|
||||
state.selectedBoardId = undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user