Skip to content

Commit

Permalink
fix(ui): few cases where board totals don't updated when moving
Browse files Browse the repository at this point in the history
  • Loading branch information
psychedelicious committed Jul 24, 2024
1 parent 4fdefe5 commit ca5a4ee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions invokeai/frontend/web/src/services/api/endpoints/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ export const imagesApi = api.injectEndpoints({
type: 'BoardImagesTotal',
id: imageDTO.board_id ?? 'none',
},
{
type: 'BoardImagesTotal',
id: board_id,
},
];
},
}),
Expand Down Expand Up @@ -454,6 +458,10 @@ export const imagesApi = api.injectEndpoints({
}),
});
tags.push({ type: 'Board', id: imageDTOs[0].board_id ?? 'none' });
tags.push({
type: 'BoardImagesTotal',
id: imageDTOs[0].board_id ?? 'none',
});
}
for (const imageDTO of imageDTOs) {
tags.push({ type: 'Image', id: imageDTO.image_name });
Expand Down Expand Up @@ -498,6 +506,10 @@ export const imagesApi = api.injectEndpoints({
categories: getCategories(imageDTOs[0]),
}),
});
tags.push({
type: 'BoardImagesTotal',
id: 'none',
});
}

result?.removed_image_names.forEach((image_name) => {
Expand Down

0 comments on commit ca5a4ee

Please sign in to comment.