diff --git a/ui/src/components/task/task-drawer.tsx b/ui/src/components/task/task-drawer.tsx
index 5ed075046..643a9aeef 100644
--- a/ui/src/components/task/task-drawer.tsx
+++ b/ui/src/components/task/task-drawer.tsx
@@ -15,7 +15,7 @@ import cx from 'classnames'
import TaskAPI from '@/client/api/task'
import { swrConfig } from '@/client/options'
import { useAppDispatch, useAppSelector } from '@/store/hook'
-import { mutateCountUpdated } from '@/store/ui/tasks'
+import { drawerDidClose, mutateCountUpdated } from '@/store/ui/tasks'
import TasksList from './task-list'
const TaskDrawer = () => {
@@ -61,7 +61,10 @@ const TaskDrawer = () => {
}
isOpen={isOpen}
- onClose={onClose}
+ onClose={() => {
+ onClose()
+ dispatch(drawerDidClose())
+ }}
onOpen={onOpen}
hasBadge={count !== undefined && count > 0}
header="Tasks"
diff --git a/ui/src/components/upload/upload-drawer.tsx b/ui/src/components/upload/upload-drawer.tsx
index bbf87a93b..f1b820f2a 100644
--- a/ui/src/components/upload/upload-drawer.tsx
+++ b/ui/src/components/upload/upload-drawer.tsx
@@ -15,6 +15,7 @@ import cx from 'classnames'
import UploadList from '@/components/upload/upload-list'
import { completedUploadsCleared } from '@/store/entities/uploads'
import { useAppDispatch, useAppSelector } from '@/store/hook'
+import { drawerDidClose } from '@/store/ui/uploads'
const UploadDrawer = () => {
const dispatch = useAppDispatch()
@@ -45,7 +46,10 @@ const UploadDrawer = () => {
}
isOpen={isOpen}
- onClose={onClose}
+ onClose={() => {
+ onClose()
+ dispatch(drawerDidClose())
+ }}
onOpen={onOpen}
hasBadge={hasPendingUploads}
header="Uploads"