diff options
Diffstat (limited to 'src/view/com/composer')
-rw-r--r-- | src/view/com/composer/Composer.tsx | 10 | ||||
-rw-r--r-- | src/view/com/composer/text-input/web/Autocomplete.tsx | 2 | ||||
-rw-r--r-- | src/view/com/composer/text-input/web/EmojiPicker.web.tsx | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index c4453e0c3..9f60923d6 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -207,7 +207,11 @@ export const ComposePost = observer(function ComposePost({ setError('') if (richtext.text.trim().length === 0 && gallery.isEmpty && !extLink) { - setError('Did you want to say anything?') + setError(_(msg`Did you want to say anything?`)) + return + } + if (extLink?.isLoading) { + setError(_(msg`Please wait for your link card to finish loading`)) return } @@ -438,7 +442,7 @@ export const ComposePost = observer(function ComposePost({ accessibilityLabel={_(msg`Add link card`)} accessibilityHint={`Creates a card with a thumbnail. The card links to ${url}`}> <Text style={pal.text}> - <Trans>Add link card:</Trans> + <Trans>Add link card:</Trans>{' '} <Text style={[pal.link, s.ml5]}>{toShortUrl(url)}</Text> </Text> </TouchableOpacity> @@ -452,7 +456,7 @@ export const ComposePost = observer(function ComposePost({ <OpenCameraBtn gallery={gallery} /> </> ) : null} - {isDesktop ? <EmojiPickerButton /> : null} + {!isMobile ? <EmojiPickerButton /> : null} <View style={s.flex1} /> <SelectLangBtn /> <CharProgress count={graphemeLength} /> diff --git a/src/view/com/composer/text-input/web/Autocomplete.tsx b/src/view/com/composer/text-input/web/Autocomplete.tsx index 1f7412561..51197b8e4 100644 --- a/src/view/com/composer/text-input/web/Autocomplete.tsx +++ b/src/view/com/composer/text-input/web/Autocomplete.tsx @@ -134,7 +134,7 @@ const MentionList = forwardRef<MentionListRef, SuggestionProps>( return true } - if (event.key === 'Enter') { + if (event.key === 'Enter' || event.key === 'Tab') { enterHandler() return true } diff --git a/src/view/com/composer/text-input/web/EmojiPicker.web.tsx b/src/view/com/composer/text-input/web/EmojiPicker.web.tsx index 09a2dcf41..f4b2d99b0 100644 --- a/src/view/com/composer/text-input/web/EmojiPicker.web.tsx +++ b/src/view/com/composer/text-input/web/EmojiPicker.web.tsx @@ -76,7 +76,7 @@ export function EmojiPicker({close}: {close: () => void}) { return (await import('./EmojiPickerData.json')).default }} onEmojiSelect={onInsert} - autoFocus={false} + autoFocus={true} /> </View> </TouchableWithoutFeedback> @@ -96,6 +96,7 @@ const styles = StyleSheet.create({ }, trigger: { backgroundColor: 'transparent', + // @ts-ignore web only -prf border: 'none', paddingTop: 4, paddingLeft: 12, |