mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix gallery bugs
This commit is contained in:
parent
23d9d58c08
commit
aeaf3737aa
@ -8,10 +8,16 @@ const galleryLog = log.child({ namespace: 'gallery' });
|
|||||||
|
|
||||||
export const receivedResultImagesPage = createAppAsyncThunk(
|
export const receivedResultImagesPage = createAppAsyncThunk(
|
||||||
'results/receivedResultImagesPage',
|
'results/receivedResultImagesPage',
|
||||||
async (_arg, { getState }) => {
|
async (_arg, { getState, rejectWithValue }) => {
|
||||||
|
const { page, pages, nextPage } = getState().results;
|
||||||
|
|
||||||
|
if (nextPage === page) {
|
||||||
|
rejectWithValue([]);
|
||||||
|
}
|
||||||
|
|
||||||
const response = await ImagesService.listImagesWithMetadata({
|
const response = await ImagesService.listImagesWithMetadata({
|
||||||
imageType: 'results',
|
imageType: 'results',
|
||||||
imageCategory: 'image',
|
imageCategory: 'general',
|
||||||
page: getState().results.nextPage,
|
page: getState().results.nextPage,
|
||||||
perPage: IMAGES_PER_PAGE,
|
perPage: IMAGES_PER_PAGE,
|
||||||
});
|
});
|
||||||
@ -27,7 +33,7 @@ export const receivedUploadImagesPage = createAppAsyncThunk(
|
|||||||
async (_arg, { getState }) => {
|
async (_arg, { getState }) => {
|
||||||
const response = await ImagesService.listImagesWithMetadata({
|
const response = await ImagesService.listImagesWithMetadata({
|
||||||
imageType: 'uploads',
|
imageType: 'uploads',
|
||||||
imageCategory: 'image',
|
imageCategory: 'general',
|
||||||
page: getState().uploads.nextPage,
|
page: getState().uploads.nextPage,
|
||||||
perPage: IMAGES_PER_PAGE,
|
perPage: IMAGES_PER_PAGE,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user