Would adding View helps #472 ?

This commit is contained in:
xmflsct 2022-12-05 22:11:45 +01:00
parent 5338720106
commit c4f825e087
4 changed files with 17 additions and 18 deletions

View File

@ -257,13 +257,17 @@ const ScreenCompose: React.FC<RootStackScreenProps<'Screen-Compose'>> = ({
() => (
<HeaderRight
type='text'
content={
params?.type
? params.type === 'conversation' && params.visibility === 'direct'
? t(`heading.right.button.${params.type}`)
: t('heading.right.button.default')
: t('heading.right.button.default')
}
content={t(
`heading.right.button.${
(params?.type &&
(params.type === 'conversation'
? params.visibility === 'direct'
? params.type
: 'default'
: params.type)) ||
'default'
}`
)}
onPress={() => {
composeDispatch({ type: 'posting', payload: true })

View File

@ -13,13 +13,13 @@ const ComposeRootFooter: React.FC<Props> = ({ accessibleRefAttachments }) => {
const { composeState } = useContext(ComposeContext)
return (
<>
<View>
{composeState.attachments.uploads.length ? (
<ComposeAttachments accessibleRefAttachments={accessibleRefAttachments} />
) : null}
{composeState.poll.active ? <ComposePoll /> : null}
{composeState.replyToStatus ? <ComposeReply /> : null}
</>
</View>
)
}

View File

@ -11,13 +11,10 @@ import ComposeTextInput from './Header/TextInput'
const ComposeRootHeader: React.FC = () => {
const { composeState } = useContext(ComposeContext)
const instanceActive = useSelector(getInstanceActive)
const localInstances = useSelector(
getInstances,
(prev, next) => prev.length === next.length
)
const localInstances = useSelector(getInstances, (prev, next) => prev.length === next.length)
return (
<>
<View>
{instanceActive !== -1 && localInstances.length > 1 ? (
<View style={styles.postingAs}>
<ComposePostingAs />
@ -25,7 +22,7 @@ const ComposeRootHeader: React.FC = () => {
) : null}
{composeState.spoiler.active ? <ComposeSpoilerInput /> : null}
<ComposeTextInput />
</>
</View>
)
}

View File

@ -28,11 +28,9 @@ const ComposeTextInput: React.FC = () => {
<PasteInput
keyboardAppearance={mode}
style={{
...StyleConstants.FontStyle.M,
marginTop: StyleConstants.Spacing.S,
paddingBottom: StyleConstants.Spacing.M,
marginLeft: StyleConstants.Spacing.Global.PagePadding,
marginRight: StyleConstants.Spacing.Global.PagePadding,
marginHorizontal: StyleConstants.Spacing.Global.PagePadding,
color: colors.primaryDefault,
borderBottomColor: colors.border,
fontSize: adaptedFontsize,