From 339dddd018442c4efe49686be871f09724ca476f Mon Sep 17 00:00:00 2001 From: chainchompa Date: Mon, 22 Jul 2024 16:03:01 -0400 Subject: [PATCH] update uncategorized board totals when deleting and moving images --- .../web/src/services/api/endpoints/images.ts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/invokeai/frontend/web/src/services/api/endpoints/images.ts b/invokeai/frontend/web/src/services/api/endpoints/images.ts index 2040021d6d..06ec9fc162 100644 --- a/invokeai/frontend/web/src/services/api/endpoints/images.ts +++ b/invokeai/frontend/web/src/services/api/endpoints/images.ts @@ -104,6 +104,10 @@ export const imagesApi = api.injectEndpoints({ type: 'Board', id: boardId, }, + { + type: 'BoardImagesTotal', + id: boardId, + }, ]; }, }), @@ -136,6 +140,10 @@ export const imagesApi = api.injectEndpoints({ type: 'Board', id: boardId, }, + { + type: 'BoardImagesTotal', + id: boardId, + }, ]; return tags; @@ -169,6 +177,10 @@ export const imagesApi = api.injectEndpoints({ type: 'Board', id: boardId, }, + { + type: 'BoardImagesTotal', + id: boardId, + }, ]; }, }), @@ -300,6 +312,10 @@ export const imagesApi = api.injectEndpoints({ type: 'Board', id: boardId, }, + { + type: 'BoardImagesTotal', + id: boardId, + }, ]; }, }), @@ -362,6 +378,10 @@ export const imagesApi = api.injectEndpoints({ }, { type: 'Board', id: board_id }, { type: 'Board', id: imageDTO.board_id ?? 'none' }, + { + type: 'BoardImagesTotal', + id: imageDTO.board_id ?? 'none', + }, ]; }, }), @@ -393,6 +413,10 @@ export const imagesApi = api.injectEndpoints({ }, { type: 'Board', id: imageDTO.board_id ?? 'none' }, { type: 'Board', id: 'none' }, + { + type: 'BoardImagesTotal', + id: imageDTO.board_id ?? 'none', + }, ]; }, }), @@ -434,6 +458,10 @@ export const imagesApi = api.injectEndpoints({ tags.push({ type: 'Image', id: imageDTO.image_name }); } tags.push({ type: 'Board', id: board_id }); + tags.push({ + type: 'BoardImagesTotal', + id: board_id ?? 'none', + }); return tags; }, }), @@ -480,6 +508,10 @@ export const imagesApi = api.injectEndpoints({ } tags.push({ type: 'Image', id: image_name }); tags.push({ type: 'Board', id: board_id }); + tags.push({ + type: 'BoardImagesTotal', + id: board_id ?? 'none', + }); }); return tags;