mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): dnd image count
This commit is contained in:
parent
eedf81dcc5
commit
fe3b2ed357
@ -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) =>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user