From 3477cb46cf63839b7af3c97aa9192af714210ec7 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:51:07 +1000 Subject: [PATCH] fix(ui): do not invalidate image dto cache when deleting image --- .../frontend/web/src/services/api/endpoints/images.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/invokeai/frontend/web/src/services/api/endpoints/images.ts b/invokeai/frontend/web/src/services/api/endpoints/images.ts index 9605bc29c47..2040021d6d4 100644 --- a/invokeai/frontend/web/src/services/api/endpoints/images.ts +++ b/invokeai/frontend/web/src/services/api/endpoints/images.ts @@ -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) => { + return imagesApi.useGetImageDTOQuery(...args); +}; + /** * Imperative RTKQ helper to fetch an ImageDTO. * @param image_name The name of the image to fetch