mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): do not invalidate image dto cache when deleting image
This commit is contained in:
parent
0f65a12cf3
commit
fb1130c644
@ -93,7 +93,6 @@ export const imagesApi = api.injectEndpoints({
|
||||
const boardId = imageDTO.board_id ?? 'none';
|
||||
|
||||
return [
|
||||
{ type: 'Image', id: imageDTO.image_name },
|
||||
{
|
||||
type: 'ImageList',
|
||||
id: getListImagesUrl({
|
||||
@ -138,9 +137,6 @@ export const imagesApi = api.injectEndpoints({
|
||||
id: boardId,
|
||||
},
|
||||
];
|
||||
for (const imageDTO of imageDTOs) {
|
||||
tags.push({ type: 'Image', id: imageDTO.image_name });
|
||||
}
|
||||
|
||||
return tags;
|
||||
}
|
||||
@ -508,7 +504,6 @@ export const imagesApi = api.injectEndpoints({
|
||||
export const {
|
||||
useGetIntermediatesCountQuery,
|
||||
useListImagesQuery,
|
||||
useGetImageDTOQuery,
|
||||
useGetImageMetadataQuery,
|
||||
useGetImageWorkflowQuery,
|
||||
useLazyGetImageWorkflowQuery,
|
||||
@ -526,6 +521,10 @@ export const {
|
||||
useBulkDownloadImagesMutation,
|
||||
} = imagesApi;
|
||||
|
||||
export const useGetImageDTOQuery = (...args: Parameters<typeof imagesApi.useGetImageDTOQuery>) => {
|
||||
return imagesApi.useGetImageDTOQuery(...args);
|
||||
};
|
||||
|
||||
/**
|
||||
* Imperative RTKQ helper to fetch an ImageDTO.
|
||||
* @param image_name The name of the image to fetch
|
||||
|
Loading…
Reference in New Issue
Block a user