Skip to content

Commit 8a73df4

Browse files
fix(ui): progress image does not hide on viewer with autoswitch disabled
1 parent ea2e1ea commit 8a73df4

File tree

1 file changed

+6
-1
lines changed
  • invokeai/frontend/web/src/features/gallery/components/ImageViewer

1 file changed

+6
-1
lines changed

invokeai/frontend/web/src/features/gallery/components/ImageViewer/context.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ export const ImageViewerContextProvider = memo((props: PropsWithChildren) => {
7878
// create the illusion of the progress image "resolving" into the final image. If we cleared the progress image
7979
// now, there would be a flicker where the progress image disappears before the final image appears, and the
8080
// last-selected gallery image should be shown for a brief moment.
81-
if (data.status === 'canceled' || data.status === 'failed') {
81+
//
82+
// When gallery auto-switch is disabled, we do not need to create this illusion, because we are not going to
83+
// switch to the final image automatically. In this case, we clear the progress image immediately.
84+
//
85+
// We also clear the progress image if the queue item is canceled or failed, as there is no final image to show.
86+
if (data.status === 'canceled' || data.status === 'failed' || !autoSwitch) {
8287
$progressEvent.set(null);
8388
$progressImage.set(null);
8489
}

0 commit comments

Comments
 (0)