Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): few cases where board totals don't updated when moving #6665

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading