mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): do not show progress images in uploads gallery category
This commit is contained in:
parent
7dc9d18052
commit
65b527eb20
@ -54,11 +54,7 @@ import { uploadsAdapter } from '../store/uploadsSlice';
|
|||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { RootState } from 'app/store/store';
|
import { RootState } from 'app/store/store';
|
||||||
import { Virtuoso, VirtuosoGrid } from 'react-virtuoso';
|
import { Virtuoso, VirtuosoGrid } from 'react-virtuoso';
|
||||||
import ProgressImagePreview from 'features/parameters/components/_ProgressImagePreview';
|
|
||||||
import ProgressImage from 'features/parameters/components/ProgressImage';
|
|
||||||
import { systemSelector } from 'features/system/store/systemSelectors';
|
|
||||||
import { Image as ImageType } from 'app/types/invokeai';
|
import { Image as ImageType } from 'app/types/invokeai';
|
||||||
import { ProgressImage as ProgressImageType } from 'services/events/types';
|
|
||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
||||||
import GalleryProgressImage from './GalleryProgressImage';
|
import GalleryProgressImage from './GalleryProgressImage';
|
||||||
|
|
||||||
@ -71,13 +67,13 @@ const selector = createSelector(
|
|||||||
const { results, uploads, system, gallery } = state;
|
const { results, uploads, system, gallery } = state;
|
||||||
const { currentCategory } = gallery;
|
const { currentCategory } = gallery;
|
||||||
|
|
||||||
const tempImages: (ImageType | typeof PROGRESS_IMAGE_PLACEHOLDER)[] = [];
|
|
||||||
|
|
||||||
if (system.progressImage) {
|
|
||||||
tempImages.push(PROGRESS_IMAGE_PLACEHOLDER);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentCategory === 'results') {
|
if (currentCategory === 'results') {
|
||||||
|
const tempImages: (ImageType | typeof PROGRESS_IMAGE_PLACEHOLDER)[] = [];
|
||||||
|
|
||||||
|
if (system.progressImage) {
|
||||||
|
tempImages.push(PROGRESS_IMAGE_PLACEHOLDER);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
images: tempImages.concat(
|
images: tempImages.concat(
|
||||||
resultsAdapter.getSelectors().selectAll(results)
|
resultsAdapter.getSelectors().selectAll(results)
|
||||||
@ -88,9 +84,7 @@ const selector = createSelector(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
images: tempImages.concat(
|
images: uploadsAdapter.getSelectors().selectAll(uploads),
|
||||||
uploadsAdapter.getSelectors().selectAll(uploads)
|
|
||||||
),
|
|
||||||
isLoading: uploads.isLoading,
|
isLoading: uploads.isLoading,
|
||||||
areMoreImagesAvailable: uploads.page < uploads.pages - 1,
|
areMoreImagesAvailable: uploads.page < uploads.pages - 1,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user