mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
Fix model install queue rendering and invalidate board cache on invocation
Co-authored-by: kent <kent@invoke.ai>
This commit is contained in:
@@ -55,9 +55,7 @@ export const ModelInstallQueue = memo(() => {
|
||||
<Box layerStyle="first" p={3} borderRadius="base" w="full" h="full">
|
||||
<ScrollableContent>
|
||||
<Flex flexDir="column-reverse" gap="2" w="full">
|
||||
{data?.map((model) => (
|
||||
<ModelInstallQueueItem key={model.id} installJob={model} />
|
||||
))}
|
||||
{data?.map((model) => <ModelInstallQueueItem key={model.id} installJob={model} />)}
|
||||
</Flex>
|
||||
</ScrollableContent>
|
||||
</Box>
|
||||
|
||||
@@ -71,6 +71,12 @@ export const buildOnInvocationComplete = (getState: AppGetState, dispatch: AppDi
|
||||
}
|
||||
dispatch(boardsApi.util.upsertQueryEntries(entries));
|
||||
|
||||
// Invalidate board cache to update image counts in the UI
|
||||
const boardIds = Object.keys(boardTotalAdditions);
|
||||
if (boardIds.length > 0) {
|
||||
dispatch(boardsApi.util.invalidateTags(boardIds.map((boardId) => ({ type: 'Board' as const, id: boardId }))));
|
||||
}
|
||||
|
||||
/**
|
||||
* Optimistic update and cache invalidation for image names queries that match this image's board and categories.
|
||||
* - Optimistic update for the cache that does not have a search term (we cannot derive the correct insertion
|
||||
|
||||
Reference in New Issue
Block a user