File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
invokeai/frontend/web/src/services/events Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 5
5
selectAutoSwitch ,
6
6
selectGalleryView ,
7
7
selectGetImageNamesQueryArgs ,
8
+ selectListBoardsQueryArgs ,
8
9
selectSelectedBoardId ,
9
10
} from 'features/gallery/store/gallerySelectors' ;
10
11
import { boardIdSelected , galleryViewChanged , imageSelected } from 'features/gallery/store/gallerySlice' ;
@@ -76,6 +77,14 @@ export const buildOnInvocationComplete = (
76
77
}
77
78
dispatch ( boardsApi . util . upsertQueryEntries ( entries ) ) ;
78
79
80
+ dispatch (
81
+ boardsApi . util . updateQueryData ( 'listAllBoards' , selectListBoardsQueryArgs ( getState ( ) ) , ( draft ) => {
82
+ for ( const board of draft ) {
83
+ board . image_count = board . image_count + ( boardTotalAdditions [ board . board_id ] ?? 0 ) ;
84
+ }
85
+ } )
86
+ ) ;
87
+
79
88
/**
80
89
* Optimistic update and cache invalidation for image names queries that match this image's board and categories.
81
90
* - Optimistic update for the cache that does not have a search term (we cannot derive the correct insertion
You can’t perform that action at this time.
0 commit comments