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

Configure Feed

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

at a876aae44ea07494ebea9727350aa060b81f317b 31 lines 918 B view raw
1import {useCallback} from 'react' 2import * as Device from 'expo-device' 3import {impactAsync, ImpactFeedbackStyle} from 'expo-haptics' 4 5import {useHapticsDisabled} from '#/state/preferences/disable-haptics' 6import {IS_IOS, IS_WEB} from '#/env' 7 8export function useHaptics() { 9 const isHapticsDisabled = useHapticsDisabled() 10 11 return useCallback( 12 (strength: 'Light' | 'Medium' | 'Heavy' = 'Medium') => { 13 if (isHapticsDisabled || IS_WEB) { 14 return 15 } 16 17 // Users said the medium impact was too strong on Android; see APP-537s 18 const style = IS_IOS 19 ? ImpactFeedbackStyle[strength] 20 : ImpactFeedbackStyle.Light 21 impactAsync(style) 22 23 // DEV ONLY - show a toast when a haptic is meant to fire on simulator 24 if (__DEV__ && !Device.isDevice) { 25 // disabled because it's annoying 26 // Toast.show(`Buzzz!`) 27 } 28 }, 29 [isHapticsDisabled], 30 ) 31}