diff --git a/invokeai/frontend/web/src/services/thunks/gallery.ts b/invokeai/frontend/web/src/services/thunks/gallery.ts index 694d44db3e..01e8a986b2 100644 --- a/invokeai/frontend/web/src/services/thunks/gallery.ts +++ b/invokeai/frontend/web/src/services/thunks/gallery.ts @@ -8,10 +8,16 @@ const galleryLog = log.child({ namespace: 'gallery' }); export const receivedResultImagesPage = createAppAsyncThunk( 'results/receivedResultImagesPage', - async (_arg, { getState }) => { + async (_arg, { getState, rejectWithValue }) => { + const { page, pages, nextPage } = getState().results; + + if (nextPage === page) { + rejectWithValue([]); + } + const response = await ImagesService.listImagesWithMetadata({ imageType: 'results', - imageCategory: 'image', + imageCategory: 'general', page: getState().results.nextPage, perPage: IMAGES_PER_PAGE, }); @@ -27,7 +33,7 @@ export const receivedUploadImagesPage = createAppAsyncThunk( async (_arg, { getState }) => { const response = await ImagesService.listImagesWithMetadata({ imageType: 'uploads', - imageCategory: 'image', + imageCategory: 'general', page: getState().uploads.nextPage, perPage: IMAGES_PER_PAGE, });