[Session] Drill getAgent into notifications/utils (#3703)

* Drill into notifications/util

(cherry picked from commit 84b535ed54f4fe93debcd198809bb184519c3507)

* Thread getAgent instead

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
This commit is contained in:
Eric Bailey 2024-04-25 15:48:01 -05:00 committed by GitHub
parent a69e567991
commit 35005da59e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 9 deletions

View file

@ -27,6 +27,7 @@ import {
} from '@tanstack/react-query'
import {useMutedThreads} from '#/state/muted-threads'
import {getAgent} from '#/state/session'
import {STALE} from '..'
import {useModerationOpts} from '../preferences'
import {embedViewRecordToPostView, getEmbeddedPost} from '../util'
@ -71,6 +72,7 @@ export function useNotificationFeedQuery(opts?: {enabled?: boolean}) {
if (!page) {
page = (
await fetchPage({
getAgent,
limit: PAGE_SIZE,
cursor: pageParam,
queryClient,