Bluesky app fork with some witchin' additions 馃挮 witchsky.app
bluesky fork client
119
fork

Configure Feed

Select the types of activity you want to include in your feed.

at a876aae44ea07494ebea9727350aa060b81f317b 21 lines 648 B view raw
1import {device, useStorage} from '#/storage' 2 3export function useDevMode() { 4 const [devMode = false, setDevMode] = useStorage(device, ['devMode']) 5 6 return [devMode, setDevMode] as const 7} 8 9let cachedIsDevMode: boolean | undefined 10/** 11 * Does not update when toggling dev mode on or off. This util simply retrieves 12 * the value and caches in memory indefinitely. So after an update, you'll need 13 * to reload the app so it can pull a fresh value from storage. 14 */ 15export function isDevMode() { 16 if (__DEV__) return true 17 if (cachedIsDevMode === undefined) { 18 cachedIsDevMode = device.get(['devMode']) ?? false 19 } 20 return cachedIsDevMode 21}