diff --git a/src/storage/index.ts b/src/storage/index.ts index ce17d4c366..8ec09eefa8 100644 --- a/src/storage/index.ts +++ b/src/storage/index.ts @@ -1,6 +1,7 @@ import {MMKV} from 'react-native-mmkv' +import {Did} from '@atproto/api' -import {Device} from '#/storage/schema' +import {Account, Device} from '#/storage/schema' export * from '#/storage/schema' @@ -73,9 +74,15 @@ export class Storage { */ export const device = new Storage<[], Device>({id: 'bsky_device'}) +/** + * Account data that's specific to the account on this device + */ +export const account = new Storage<[Did], Account>({id: 'bsky_account'}) + if (__DEV__ && typeof window !== 'undefined') { // @ts-ignore window.bsky_storage = { device, + account, } } diff --git a/src/storage/schema.ts b/src/storage/schema.ts index cfca9131c7..d8b9874e4e 100644 --- a/src/storage/schema.ts +++ b/src/storage/schema.ts @@ -10,3 +10,7 @@ export type Device = { } trendingBetaEnabled: boolean } + +export type Account = { + searchTermHistory?: string[] +}