From e729647c022feccc647e18c01a9d59af97e57f40 Mon Sep 17 00:00:00 2001 From: Hailey Date: Fri, 10 May 2024 08:09:00 -0700 Subject: [🐴] Adjust messages list styles (#3945) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * some initial tweaks * tweaks * more tweaks * tweak chat header * properly align placeholders * tweak web header * one more... * remove extra loading states from chat * limit line count for display name * Tweaks styles (#3949) * Adjust sizing * Consistent font size * Adjust header * oops * fix accessibility in list * don't use `identifier` for notifications, use `dates` instead --------- Co-authored-by: Eric Bailey --- src/lib/hooks/useNotificationHandler.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/hooks/useNotificationHandler.ts') diff --git a/src/lib/hooks/useNotificationHandler.ts b/src/lib/hooks/useNotificationHandler.ts index 12e150572..3240a4854 100644 --- a/src/lib/hooks/useNotificationHandler.ts +++ b/src/lib/hooks/useNotificationHandler.ts @@ -58,7 +58,7 @@ export function useNotificationsHandler() { const closeAllActiveElements = useCloseAllActiveElements() // Safety to prevent double handling of the same notification - const prevIdentifier = React.useRef('') + const prevDate = React.useRef(0) React.useEffect(() => { const handleNotification = (payload?: NotificationPayload) => { @@ -161,10 +161,10 @@ export function useNotificationsHandler() { const responseReceivedListener = Notifications.addNotificationResponseReceivedListener(e => { - if (e.notification.request.identifier === prevIdentifier.current) { + if (e.notification.date === prevDate.current) { return } - prevIdentifier.current = e.notification.request.identifier + prevDate.current = e.notification.date logger.debug( 'Notifications: response received', -- cgit 1.4.1