Skip to content

Commit fb1130c

Browse files
fix(ui): do not invalidate image dto cache when deleting image
1 parent 0f65a12 commit fb1130c

File tree

1 file changed

+4
-5
lines changed
  • invokeai/frontend/web/src/services/api/endpoints

1 file changed

+4
-5
lines changed

invokeai/frontend/web/src/services/api/endpoints/images.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export const imagesApi = api.injectEndpoints({
9393
const boardId = imageDTO.board_id ?? 'none';
9494

9595
return [
96-
{ type: 'Image', id: imageDTO.image_name },
9796
{
9897
type: 'ImageList',
9998
id: getListImagesUrl({
@@ -138,9 +137,6 @@ export const imagesApi = api.injectEndpoints({
138137
id: boardId,
139138
},
140139
];
141-
for (const imageDTO of imageDTOs) {
142-
tags.push({ type: 'Image', id: imageDTO.image_name });
143-
}
144140

145141
return tags;
146142
}
@@ -508,7 +504,6 @@ export const imagesApi = api.injectEndpoints({
508504
export const {
509505
useGetIntermediatesCountQuery,
510506
useListImagesQuery,
511-
useGetImageDTOQuery,
512507
useGetImageMetadataQuery,
513508
useGetImageWorkflowQuery,
514509
useLazyGetImageWorkflowQuery,
@@ -526,6 +521,10 @@ export const {
526521
useBulkDownloadImagesMutation,
527522
} = imagesApi;
528523

524+
export const useGetImageDTOQuery = (...args: Parameters<typeof imagesApi.useGetImageDTOQuery>) => {
525+
return imagesApi.useGetImageDTOQuery(...args);
526+
};
527+
529528
/**
530529
* Imperative RTKQ helper to fetch an ImageDTO.
531530
* @param image_name The name of the image to fetch

0 commit comments

Comments
 (0)