diff options
author | dan <dan.abramov@gmail.com> | 2024-10-28 19:12:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-28 19:12:15 +0000 |
commit | dcc5405e8a76037763950f2598721a30bb7934aa (patch) | |
tree | 0588f463a12ea9d33f67aa4ecbf290e5aa7a36fd /src/view/com/composer/Composer.tsx | |
parent | 5bce043e1ebad182b06f63daab8b7e397771578e (diff) | |
download | voidsky-dcc5405e8a76037763950f2598721a30bb7934aa.tar.zst |
Make composer min height conditional and align attachments (#5976)
* Make web composer min height condiitonal * Fix alignment * Fix alignment on mobile
Diffstat (limited to 'src/view/com/composer/Composer.tsx')
-rw-r--r-- | src/view/com/composer/Composer.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index efebd65fe..3eb7fbac6 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -565,6 +565,9 @@ function ComposerPost({ const {_} = useLingui() const {data: currentProfile} = useProfileQuery({did: currentDid}) const richtext = draft.richtext + const isTextOnly = + !draft.embed.link && !draft.embed.quote && !draft.embed.media + const forceMinHeight = isWeb && isTextOnly const selectTextInputPlaceholder = isReply ? _(msg`Write your reply`) : _(msg`What's up?`) @@ -615,6 +618,7 @@ function ComposerPost({ richtext={richtext} placeholder={selectTextInputPlaceholder} autoFocus + webForceMinHeight={forceMinHeight} setRichText={rt => { dispatch({type: 'update_richtext', richtext: rt}) }} @@ -757,7 +761,7 @@ function ComposerEmbeds({ )} {embed.media?.type === 'gif' && ( - <View style={a.relative} key={embed.media.gif.url}> + <View style={[a.relative, a.mt_lg]} key={embed.media.gif.url}> <ExternalEmbedGif gif={embed.media.gif} onRemove={() => dispatch({type: 'embed_remove_gif'})} @@ -773,7 +777,7 @@ function ComposerEmbeds({ )} {!embed.media && embed.link && ( - <View style={a.relative} key={embed.link.uri}> + <View style={[a.relative, a.mt_lg]} key={embed.link.uri}> <ExternalEmbedLink uri={embed.link.uri} hasQuote={!!embed.quote} |