Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

hide keyboard when backgrounding (#8450)

authored by

Samuel Newman and committed by
GitHub
093454f5 9e186dd2

+15
+15
src/view/com/composer/Composer.tsx
··· 64 64 type SupportedMimeTypes, 65 65 } from '#/lib/constants' 66 66 import {useAnimatedScrollHandler} from '#/lib/hooks/useAnimatedScrollHandler_FIXED' 67 + import {useAppState} from '#/lib/hooks/useAppState' 67 68 import {useIsKeyboardVisible} from '#/lib/hooks/useIsKeyboardVisible' 68 69 import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' 69 70 import {usePalette} from '#/lib/hooks/usePalette' ··· 822 823 [post.id, onSelectVideo, onImageAdd, _], 823 824 ) 824 825 826 + useHideKeyboardOnBackground() 827 + 825 828 return ( 826 829 <View 827 830 style={[ ··· 1520 1523 !post.embed.link && 1521 1524 !post.embed.quote 1522 1525 ) 1526 + } 1527 + 1528 + function useHideKeyboardOnBackground() { 1529 + const appState = useAppState() 1530 + 1531 + useEffect(() => { 1532 + if (isIOS) { 1533 + if (appState === 'inactive') { 1534 + Keyboard.dismiss() 1535 + } 1536 + } 1537 + }, [appState]) 1523 1538 } 1524 1539 1525 1540 const styles = StyleSheet.create({