diff --git a/invokeai/frontend/web/src/features/gallery/hooks/useMultiselect.ts b/invokeai/frontend/web/src/features/gallery/hooks/useMultiselect.ts index 5d8f8aab02..5671069728 100644 --- a/invokeai/frontend/web/src/features/gallery/hooks/useMultiselect.ts +++ b/invokeai/frontend/web/src/features/gallery/hooks/useMultiselect.ts @@ -1,7 +1,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { galleryImageClicked } from 'app/store/middleware/listenerMiddleware/listeners/galleryImageClicked'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; -import { selectHasSelection } from 'features/gallery/store/gallerySelectors'; +import { selectHasMultipleImagesSelected } from 'features/gallery/store/gallerySelectors'; import { selectGallerySlice, selectionChanged } from 'features/gallery/store/gallerySlice'; import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus'; import type { MouseEvent } from 'react'; @@ -10,7 +10,7 @@ import type { ImageDTO } from 'services/api/types'; export const useMultiselect = (imageDTO?: ImageDTO) => { const dispatch = useAppDispatch(); - const areMultiplesSelected = useAppSelector(selectHasSelection); + const areMultiplesSelected = useAppSelector(selectHasMultipleImagesSelected); const selectIsSelected = useMemo( () => createSelector(selectGallerySlice, (gallery) => diff --git a/invokeai/frontend/web/src/features/gallery/store/gallerySelectors.ts b/invokeai/frontend/web/src/features/gallery/store/gallerySelectors.ts index 791bd972c0..a8c327494e 100644 --- a/invokeai/frontend/web/src/features/gallery/store/gallerySelectors.ts +++ b/invokeai/frontend/web/src/features/gallery/store/gallerySelectors.ts @@ -45,7 +45,7 @@ export const selectAutoAssignBoardOnClick = createSelector( export const selectBoardSearchText = createSelector(selectGallerySlice, (gallery) => gallery.boardSearchText); export const selectSearchTerm = createSelector(selectGallerySlice, (gallery) => gallery.searchTerm); export const selectSelectionCount = createSelector(selectGallerySlice, (gallery) => gallery.selection.length); -export const selectHasSelection = createSelector(selectSelectionCount, (count) => count > 0); +export const selectHasMultipleImagesSelected = createSelector(selectSelectionCount, (count) => count > 1); export const selectGalleryImageMinimumWidth = createSelector( selectGallerySlice, (gallery) => gallery.galleryImageMinimumWidth