From 840c632c0a708c1f1f22acd78b18221211cbb7b3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 6 Jun 2023 12:33:00 +1000 Subject: [PATCH] feat(ui): sort images by `updated_at` instead of `created_at` fixes issue where saved staging area images are sorted as expected in gallery. --- invokeai/frontend/web/src/features/gallery/store/imagesSlice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/features/gallery/store/imagesSlice.ts b/invokeai/frontend/web/src/features/gallery/store/imagesSlice.ts index cb6469aeb4..de2cdb48b2 100644 --- a/invokeai/frontend/web/src/features/gallery/store/imagesSlice.ts +++ b/invokeai/frontend/web/src/features/gallery/store/imagesSlice.ts @@ -12,7 +12,7 @@ import { receivedPageOfImages } from 'services/thunks/image'; export const imagesAdapter = createEntityAdapter({ selectId: (image) => image.image_name, - sortComparer: (a, b) => dateComparator(b.created_at, a.created_at), + sortComparer: (a, b) => dateComparator(b.updated_at, a.updated_at), }); export const IMAGE_CATEGORIES: ImageCategory[] = ['general'];