Fix keyboard appearance

Should match what the app is instead of system
This commit is contained in:
Zhiyuan Zheng 2021-03-08 23:48:09 +01:00
parent 960634ec0b
commit e5effd6b65
No known key found for this signature in database
GPG Key ID: 078A93AB607D85E0
6 changed files with 12 additions and 6 deletions

View File

@ -35,7 +35,7 @@ const ComponentInstance: React.FC<Props> = ({
goBack = false
}) => {
const { t } = useTranslation('componentInstance')
const { theme } = useTheme()
const { mode, theme } = useTheme()
const instances = useSelector(getInstances, () => true)
const [domain, setDomain] = useState<string>()
@ -158,6 +158,7 @@ const ComponentInstance: React.FC<Props> = ({
placeholder={t('server.textInput.placeholder')}
placeholderTextColor={theme.secondary}
returnKeyType='go'
keyboardAppearance={mode}
/>
<Button
type='text'

View File

@ -25,7 +25,7 @@ const ComposeEditAttachmentRoot: React.FC<Props> = ({
setAltText
}) => {
const { t } = useTranslation('sharedCompose')
const { theme } = useTheme()
const { mode, theme } = useTheme()
const { composeState } = useContext(ComposeContext)
const theAttachment = composeState.attachments.uploads[index].remote
@ -79,6 +79,7 @@ const ComposeEditAttachmentRoot: React.FC<Props> = ({
placeholderTextColor={theme.secondary}
scrollEnabled
value={altText}
keyboardAppearance={mode}
/>
<Text style={[styles.altTextLength, { color: theme.secondary }]}>
{altText?.length || 0} / 1500

View File

@ -19,7 +19,7 @@ const ComposePoll: React.FC = () => {
composeDispatch
} = useContext(ComposeContext)
const { t } = useTranslation('sharedCompose')
const { theme } = useTheme()
const { mode, theme } = useTheme()
const [firstRender, setFirstRender] = useState(true)
useEffect(() => {
@ -48,6 +48,7 @@ const ComposePoll: React.FC = () => {
color={theme.secondary}
/>
<TextInput
keyboardAppearance={mode}
{...(i === 0 && firstRender && { autoFocus: true })}
style={[
styles.textInput,

View File

@ -9,10 +9,11 @@ import ComposeContext from '../../utils/createContext'
const ComposeSpoilerInput: React.FC = () => {
const { composeState, composeDispatch } = useContext(ComposeContext)
const { t } = useTranslation('sharedCompose')
const { theme } = useTheme()
const { mode, theme } = useTheme()
return (
<TextInput
keyboardAppearance={mode}
style={[
styles.spoilerInput,
{

View File

@ -9,10 +9,11 @@ import ComposeContext from '../../utils/createContext'
const ComposeTextInput: React.FC = () => {
const { composeState, composeDispatch } = useContext(ComposeContext)
const { t } = useTranslation('sharedCompose')
const { theme } = useTheme()
const { mode, theme } = useTheme()
return (
<TextInput
keyboardAppearance={mode}
style={[
styles.textInput,
{

View File

@ -68,7 +68,7 @@ const sharedScreens = (
}: NativeStackNavigatorProps) => JSX.Element
>
) => {
const { theme } = useTheme()
const { mode, theme } = useTheme()
const { t } = useTranslation()
const [searchTerm, setSearchTerm] = useState<string>()
@ -178,6 +178,7 @@ const sharedScreens = (
}
/>
<TextInput
keyboardAppearance={mode}
style={[
styles.textInput,
{