mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fixed problems
This commit is contained in:
parent
c3d6ff5b11
commit
99e6bb48ba
@ -24,7 +24,7 @@ export default function SettingsClearIntermediates() {
|
|||||||
useClearIntermediatesMutation();
|
useClearIntermediatesMutation();
|
||||||
|
|
||||||
const { data: queueStatus } = useGetQueueStatusQuery();
|
const { data: queueStatus } = useGetQueueStatusQuery();
|
||||||
const hasPendingItems = queueStatus && (queueStatus.in_progress > 0 || queueStatus.pending > 0);
|
const hasPendingItems = queueStatus && (queueStatus.queue.in_progress > 0 || queueStatus.queue.pending > 0);
|
||||||
|
|
||||||
const handleClickClearIntermediates = useCallback(() => {
|
const handleClickClearIntermediates = useCallback(() => {
|
||||||
if (hasPendingItems) {
|
if (hasPendingItems) {
|
||||||
@ -51,7 +51,7 @@ export default function SettingsClearIntermediates() {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}, [t, clearIntermediates, dispatch]);
|
}, [t, clearIntermediates, dispatch, hasPendingItems]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// update the count on mount
|
// update the count on mount
|
||||||
|
Loading…
x
Reference in New Issue
Block a user