From 6a4c56dfa96ed987001adfaf0553f97580f6653e Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 11 Sep 2025 21:23:16 +0300 Subject: Log cleanup (#9029) * change warn to log * networkerror check on failed to check unread notifications * rm both logs * tweak imports --- src/lib/hooks/useNotificationHandler.ts | 2 +- src/state/queries/notifications/unread.tsx | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lib/hooks/useNotificationHandler.ts b/src/lib/hooks/useNotificationHandler.ts index 7db48f432..fc2b1bb2f 100644 --- a/src/lib/hooks/useNotificationHandler.ts +++ b/src/lib/hooks/useNotificationHandler.ts @@ -386,7 +386,7 @@ export function getNotificationPayload( return payload } else { if (payload) { - notyLogger.warn('getNotificationPayload: received unknown payload', { + notyLogger.debug('getNotificationPayload: received unknown payload', { payload, identifier: e.request.identifier, }) diff --git a/src/state/queries/notifications/unread.tsx b/src/state/queries/notifications/unread.tsx index 8bbd00be0..77e6b2a2c 100644 --- a/src/state/queries/notifications/unread.tsx +++ b/src/state/queries/notifications/unread.tsx @@ -9,10 +9,9 @@ import EventEmitter from 'eventemitter3' import BroadcastChannel from '#/lib/broadcast' import {resetBadgeCount} from '#/lib/notifications/notifications' -import {logger} from '#/logger' +import {useModerationOpts} from '#/state/preferences/moderation-opts' +import {truncateAndInvalidate} from '#/state/queries/util' import {useAgent, useSession} from '#/state/session' -import {useModerationOpts} from '../../preferences/moderation-opts' -import {truncateAndInvalidate} from '../util' import {RQKEY as RQKEY_NOTIFS} from './feed' import {type CachedFeedPage, type FeedPage} from './types' import {fetchPage} from './util' @@ -189,8 +188,6 @@ export function Provider({children}: React.PropsWithChildren<{}>) { truncateAndInvalidate(queryClient, RQKEY_NOTIFS('mentions')) } broadcast.postMessage({event: unreadCountStr}) - } catch (e) { - logger.warn('Failed to check unread notifications', {error: e}) } finally { isFetchingRef.current = false } -- cgit 1.4.1