about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-09-11 21:23:16 +0300
committerGitHub <noreply@github.com>2025-09-11 11:23:16 -0700
commit6a4c56dfa96ed987001adfaf0553f97580f6653e (patch)
treee6a87a192a09f9d63d767f58f8cef9cca30ee341
parent836d16fec9788a649542211110fca105c5290ddb (diff)
downloadvoidsky-6a4c56dfa96ed987001adfaf0553f97580f6653e.tar.zst
Log cleanup (#9029)
* change warn to log

* networkerror check on failed to check unread notifications

* rm both logs

* tweak imports
-rw-r--r--src/lib/hooks/useNotificationHandler.ts2
-rw-r--r--src/state/queries/notifications/unread.tsx7
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
         }