diff --git a/src/view/com/composer/ComposePost.tsx b/src/view/com/composer/ComposePost.tsx index eaf92798..3cb31c53 100644 --- a/src/view/com/composer/ComposePost.tsx +++ b/src/view/com/composer/ComposePost.tsx @@ -9,6 +9,7 @@ import { StyleSheet, TextInput, TouchableOpacity, + TouchableWithoutFeedback, View, } from 'react-native' import LinearGradient from 'react-native-linear-gradient' @@ -88,6 +89,9 @@ export const ComposePost = observer(function ComposePost({ } }, []) + const onPressContainer = () => { + textInput.current?.focus() + } const onPressSelectPhotos = () => { if (isSelectingPhotos) { setIsSelectingPhotos(false) @@ -183,156 +187,162 @@ export const ComposePost = observer(function ComposePost({ testID="composePostView" behavior={Platform.OS === 'ios' ? 'padding' : 'height'} style={[pal.view, styles.outer]}> - - - - Cancel - - - {isProcessing ? ( - - - - ) : canPost ? ( + + + - - - {replyTo ? 'Reply' : 'Post'} - - + testID="composerCancelButton" + onPress={onPressCancel}> + Cancel - ) : ( - - Post - - )} - - {isProcessing ? ( - - {processingState} - - ) : undefined} - {error !== '' && ( - - - - - {error} - - )} - - {replyTo ? ( - - - - - - {replyTo.text} - + + {isProcessing ? ( + + - - ) : undefined} - - - onChangeText(text)} - placeholder={selectTextInputPlaceholder} - placeholderTextColor={pal.colors.textLight} - style={[pal.text, styles.textInput]}> - {textDecorated} - - - - - {isSelectingPhotos && - localPhotos.photos != null && - selectedPhotos.length < 4 && ( - - )} - - - - - - - {MAX_TEXT_LENGTH - text.length} - - - {text.length > DANGER_TEXT_LENGTH ? ( - + ) : canPost ? ( + + + + {replyTo ? 'Reply' : 'Post'} + + + ) : ( - + + Post + )} - - - + {isProcessing ? ( + + {processingState} + + ) : undefined} + {error !== '' && ( + + + + + {error} + + )} + + {replyTo ? ( + + + + + + {replyTo.text} + + + + ) : undefined} + + + onChangeText(text)} + placeholder={selectTextInputPlaceholder} + placeholderTextColor={pal.colors.textLight} + style={[pal.text, styles.textInput]}> + {textDecorated} + + + + + {isSelectingPhotos && + localPhotos.photos != null && + selectedPhotos.length < 4 && ( + + )} + + + + + + + {MAX_TEXT_LENGTH - text.length} + + + {text.length > DANGER_TEXT_LENGTH ? ( + + ) : ( + + )} + + + + + ) })