From 6b3eb401b04ee442005a9690dcf90e16d46c35e0 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Sat, 9 Dec 2023 15:09:31 -0800 Subject: Multiple notifications fixes (#2154) * Dont reset notifications feed on push notification event * Dont separate notifications by read state to avoid jank * On notifications screen focus, check latest and only rerender if not scrolled down * Reuse the cached notifs page when its not stale * Bump ios build number * Improve comments * Change the 'mark all read' condition to avoid firing too early --- src/lib/notifications/notifications.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lib/notifications/notifications.ts') diff --git a/src/lib/notifications/notifications.ts b/src/lib/notifications/notifications.ts index d115dc98f..342839a7b 100644 --- a/src/lib/notifications/notifications.ts +++ b/src/lib/notifications/notifications.ts @@ -81,6 +81,7 @@ export function registerTokenChangeHandler( export function init(queryClient: QueryClient) { // handle notifications that are received, both in the foreground or background + // NOTE: currently just here for debug logging Notifications.addNotificationReceivedListener(event => { logger.debug( 'Notifications: received', @@ -88,8 +89,6 @@ export function init(queryClient: QueryClient) { logger.DebugContext.notifications, ) if (event.request.trigger.type === 'push') { - // refresh notifications in the background - truncateAndInvalidate(queryClient, RQKEY_NOTIFS()) // handle payload-based deeplinks let payload if (isIOS) { -- cgit 1.4.1