From 328f160e88b403b193f3a0708ffce4f878084ec5 Mon Sep 17 00:00:00 2001 From: chainchompa Date: Fri, 14 Jun 2024 17:09:07 -0400 Subject: [PATCH] refetch model installs when a new model install starts --- .../listeners/socketio/socketModelInstall.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts index 7fafb8302c..adfa7edd06 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts @@ -6,9 +6,17 @@ import { socketModelInstallComplete, socketModelInstallDownloadProgress, socketModelInstallError, + socketModelInstallStarted, } from 'services/events/actions'; export const addModelInstallEventListener = (startAppListening: AppStartListening) => { + startAppListening({ + actionCreator: socketModelInstallStarted, + effect: async (action, { dispatch }) => { + dispatch(api.util.invalidateTags([{ type: 'ModelInstalls' }])); + }, + }); + startAppListening({ actionCreator: socketModelInstallDownloadProgress, effect: async (action, { dispatch }) => {