From 0d4303861a74e91d4391aa1610d26462d0712d0f Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 21 Oct 2023 18:49:39 +0800 Subject: [PATCH] Auto-set new notification as false It means it's read from other tabs or devices So, so cool. --- src/components/background-service.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/background-service.jsx b/src/components/background-service.jsx index 8061b97b..927a1748 100644 --- a/src/components/background-service.jsx +++ b/src/components/background-service.jsx @@ -32,9 +32,7 @@ export default memo(function BackgroundService({ isLoggedIn }) { lastReadId = markers?.notifications?.lastReadId; } catch (e) {} if (lastReadId) { - if (notifications[0].id !== lastReadId) { - states.notificationsShowNew = true; - } + states.notificationsShowNew = notifications[0].id !== lastReadId; } else { states.notificationsShowNew = true; }