diff options
author | Hailey <me@haileyok.com> | 2024-05-10 08:09:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-10 08:09:00 -0700 |
commit | e729647c022feccc647e18c01a9d59af97e57f40 (patch) | |
tree | fb351f626d22700ff93a6391f0f90e2b9c5a655c /src/lib/hooks | |
parent | 1a90426026aa4fc851f61044d27fa0c1febdb715 (diff) | |
download | voidsky-e729647c022feccc647e18c01a9d59af97e57f40.tar.zst |
[🐴] Adjust messages list styles (#3945)
* 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 <git@esb.lol>
Diffstat (limited to 'src/lib/hooks')
-rw-r--r-- | src/lib/hooks/useNotificationHandler.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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', |