Remove apparently unneeded fix to improve the experience by not changing the keyboards (#6409)

This commit is contained in:
Daniel Espino García 2022-06-20 14:37:50 +02:00 committed by GitHub
parent 7a71d864e2
commit 0ea2873942
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,6 @@ import {Events, Screens} from '@constants';
import {useServerUrl} from '@context/server';
import {useTheme} from '@context/theme';
import {useIsTablet} from '@hooks/device';
import useDidUpdate from '@hooks/did_update';
import {t} from '@i18n';
import NavigationStore from '@store/navigation_store';
import {extractFileInfo} from '@utils/file';
@ -296,22 +295,6 @@ export default function PostInput({
};
}, [handleHardwareEnterPress]);
useDidUpdate(() => {
if (!value) {
if (Platform.OS === 'android') {
// Fixes the issue where Android predictive text would prepend suggestions to the post draft when messages
// are typed successively without blurring the input
setKeyboardType('email-address');
}
}
}, [value]);
useDidUpdate(() => {
if (Platform.OS === 'android' && keyboardType === 'email-address') {
setKeyboardType('default');
}
}, [keyboardType]);
return (
<PasteableTextInput
allowFontScaling={true}