Performance improvements: structural sharing & moderation opts context (#3785)

* Fix: correctly apply structural sharing to preferences object

* Move moderation opts into a context

* Fix import

* Remove log

* Pass userdid directly

* Pass moderationPrefs directly
This commit is contained in:
Paul Frazee 2024-04-30 21:06:51 -07:00 committed by GitHub
parent 39807a8630
commit 31cb3e5422
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 231 additions and 120 deletions

View file

@ -32,7 +32,8 @@ import {FeedTuner, FeedTunerFn, NoopFeedTuner} from 'lib/api/feed-manip'
import {BSKY_FEED_OWNER_DIDS} from 'lib/constants'
import {KnownError} from '#/view/com/posts/FeedErrorMessage'
import {useFeedTuners} from '../preferences/feed-tuners'
import {useModerationOpts, usePreferencesQuery} from './preferences'
import {useModerationOpts} from '../preferences/moderation-opts'
import {usePreferencesQuery} from './preferences'
import {embedViewRecordToPostView, getEmbeddedPost} from './util'
type ActorDid = string