From afb80d3dc6de7404336a5254264394a43ba12438 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 31 Oct 2023 15:41:56 +0800 Subject: [PATCH] Hide "new notifications" button early --- src/pages/notifications.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/notifications.jsx b/src/pages/notifications.jsx index f7b18f51..8cf6e357 100644 --- a/src/pages/notifications.jsx +++ b/src/pages/notifications.jsx @@ -54,6 +54,8 @@ function Notifications({ columnMode }) { const notificationsIterator = useRef(); async function fetchNotifications(firstLoad) { + states.notificationsShowNew = false; // Hide "new notifications" button early + if (firstLoad || !notificationsIterator.current) { // Reset iterator notificationsIterator.current = masto.v1.notifications.list({ @@ -90,7 +92,6 @@ function Notifications({ columnMode }) { } } - states.notificationsShowNew = false; states.notificationsLastFetchTime = Date.now(); return allNotifications; }