move labeler cache to mmkv, make moderation config sync
The per-account labeler cache was the only async dependency in configureModerationForAccount. MMKV-backed sync reads let session setup apply labelers in the same tick. No AsyncStorage backfill: the cache is rewritten on every preferences fetch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -108,4 +108,15 @@ export type Account = {
|
||||
* account after a switch, until that account's preferences loaded.
|
||||
*/
|
||||
isBetaUser?: boolean
|
||||
|
||||
/**
|
||||
* The account's subscribed labeler DIDs, cached from preferences so the
|
||||
* `atproto-accept-labelers` header can be configured synchronously at
|
||||
* session start, before preferences load. Eventually consistent: rewritten
|
||||
* on every preferences fetch (see `saveLabelers` in
|
||||
* `#/state/session/moderation`). Until the first fetch lands there is
|
||||
* simply no cache entry and initial requests go out without per-account
|
||||
* labeler headers.
|
||||
*/
|
||||
labelers?: string[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user