summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLASER-Yi <[email protected]>2021-08-30 09:31:00 +0800
committerLASER-Yi <[email protected]>2021-08-30 09:31:00 +0800
commite8fa5d982f0fc765b32221bbf9e6b6ee7afdd415 (patch)
tree4b547049a4fa2b016996be93acb984418af3620d
parent275598a3934b8e5ac4b5340b0ad409a097f890a7 (diff)
downloadbazarr-e8fa5d982f0fc765b32221bbf9e6b6ee7afdd415.tar.gz
bazarr-e8fa5d982f0fc765b32221bbf9e6b6ee7afdd415.zip
no log: Remove red dot when notification center is empty
-rw-r--r--frontend/src/App/Notification.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/frontend/src/App/Notification.tsx b/frontend/src/App/Notification.tsx
index c5d405acf..73323baa8 100644
--- a/frontend/src/App/Notification.tsx
+++ b/frontend/src/App/Notification.tsx
@@ -76,6 +76,12 @@ const NotificationCenter: FunctionComponent = () => {
}
}, [hasNewProgress, hasNewNotifications]);
+ useDidUpdate(() => {
+ if (progress.length === 0 && notifications.length === 0) {
+ setHasNew(false);
+ }
+ }, [progress.length, notifications.length]);
+
const [btnState, setBtnState] = useState(State.Idle);
const totalProgress = useTotalProgress(progress);