1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Allow custom exit

This commit is contained in:
xmflsct
2022-09-23 00:21:41 +02:00
parent 8ef2b89a09
commit 7d9056b562
12 changed files with 38 additions and 71 deletions

View File

@ -27,7 +27,7 @@ const EmojisList = () => {
const { reduceMotionEnabled } = useAccessibility()
const { t } = useTranslation()
const { emojisState } = useContext(EmojisContext)
const { emojisState, emojisDispatch } = useContext(EmojisContext)
const { colors, mode } = useTheme()
const addEmoji = (shortcode: string) => {
@ -165,6 +165,17 @@ const EmojisList = () => {
autoCorrect={false}
spellCheck={false}
/>
<Pressable
style={{ paddingLeft: StyleConstants.Spacing.M }}
onPress={() => {
if (emojisState.targetIndex !== -1) {
emojisState.inputProps[emojisState.targetIndex].ref?.current?.focus()
}
emojisDispatch({ type: 'target', payload: -1 })
}}
>
<Icon name='ChevronDown' size={StyleConstants.Font.Size.L} color={colors.secondary} />
</Pressable>
</View>
<SectionList
accessible