mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
parent
1c099e0abb
commit
2060ee22f2
@ -30,6 +30,7 @@ import {
|
||||
isCanvasMaskLine,
|
||||
} from './canvasTypes';
|
||||
import { appSocketQueueItemStatusChanged } from 'services/events/actions';
|
||||
import { queueApi } from 'services/api/endpoints/queue';
|
||||
|
||||
export const initialLayerState: CanvasLayerState = {
|
||||
objects: [],
|
||||
@ -812,6 +813,20 @@ export const canvasSlice = createSlice({
|
||||
);
|
||||
}
|
||||
});
|
||||
builder.addMatcher(
|
||||
queueApi.endpoints.clearQueue.matchFulfilled,
|
||||
(state) => {
|
||||
state.batchIds = [];
|
||||
}
|
||||
);
|
||||
builder.addMatcher(
|
||||
queueApi.endpoints.cancelByBatchIds.matchFulfilled,
|
||||
(state, action) => {
|
||||
state.batchIds = state.batchIds.filter(
|
||||
(id) => !action.meta.arg.originalArgs.batch_ids.includes(id)
|
||||
);
|
||||
}
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user