Skip to content

Commit 6a4c56d

Browse files
authored
Log cleanup (#9029)
* change warn to log * networkerror check on failed to check unread notifications * rm both logs * tweak imports
1 parent 836d16f commit 6a4c56d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/lib/hooks/useNotificationHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export function getNotificationPayload(
386386
return payload
387387
} else {
388388
if (payload) {
389-
notyLogger.warn('getNotificationPayload: received unknown payload', {
389+
notyLogger.debug('getNotificationPayload: received unknown payload', {
390390
payload,
391391
identifier: e.request.identifier,
392392
})

src/state/queries/notifications/unread.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ import EventEmitter from 'eventemitter3'
99

1010
import BroadcastChannel from '#/lib/broadcast'
1111
import {resetBadgeCount} from '#/lib/notifications/notifications'
12-
import {logger} from '#/logger'
12+
import {useModerationOpts} from '#/state/preferences/moderation-opts'
13+
import {truncateAndInvalidate} from '#/state/queries/util'
1314
import {useAgent, useSession} from '#/state/session'
14-
import {useModerationOpts} from '../../preferences/moderation-opts'
15-
import {truncateAndInvalidate} from '../util'
1615
import {RQKEY as RQKEY_NOTIFS} from './feed'
1716
import {type CachedFeedPage, type FeedPage} from './types'
1817
import {fetchPage} from './util'
@@ -189,8 +188,6 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
189188
truncateAndInvalidate(queryClient, RQKEY_NOTIFS('mentions'))
190189
}
191190
broadcast.postMessage({event: unreadCountStr})
192-
} catch (e) {
193-
logger.warn('Failed to check unread notifications', {error: e})
194191
} finally {
195192
isFetchingRef.current = false
196193
}

0 commit comments

Comments
 (0)