about summary refs log tree commit diff
path: root/src/storage
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/index.ts10
-rw-r--r--src/storage/schema.ts3
2 files changed, 12 insertions, 1 deletions
diff --git a/src/storage/index.ts b/src/storage/index.ts
index 4be08170d..7ef226d3a 100644
--- a/src/storage/index.ts
+++ b/src/storage/index.ts
@@ -1,5 +1,6 @@
 import {MMKV} from 'react-native-mmkv'
 
+import {IS_DEV} from '#/env'
 import {Device} from '#/storage/schema'
 
 export * from '#/storage/schema'
@@ -71,4 +72,11 @@ export class Storage<Scopes extends unknown[], Schema> {
  *
  *   `device.set([key], true)`
  */
-export const device = new Storage<[], Device>({id: 'device'})
+export const device = new Storage<[], Device>({id: 'bsky_device'})
+
+if (IS_DEV && typeof window !== 'undefined') {
+  // @ts-ignore
+  window.bsky_storage = {
+    device,
+  }
+}
diff --git a/src/storage/schema.ts b/src/storage/schema.ts
index 1a9656fed..cf410c77d 100644
--- a/src/storage/schema.ts
+++ b/src/storage/schema.ts
@@ -5,4 +5,7 @@ export type Device = {
   fontScale: '-2' | '-1' | '0' | '1' | '2'
   fontFamily: 'system' | 'theme'
   lastNuxDialog: string | undefined
+  geolocation?: {
+    countryCode: string | undefined
+  }
 }