Fixed: The emoji autocomplete does not appear after switching apps (#7520)
* added last viewed feature * added constants * storing data in global table and added server col * fixed stack screen" * fixed values for crt * fixed threadid store logic * added status on profile in bottom tabs * fixed error for profile edit * refactored and removed rule from eslint * fixed variable in username field * fixed screen blur focus issue * keyboard show issue
This commit is contained in:
parent
06037ab6da
commit
70ea5dc0d1
1 changed files with 11 additions and 4 deletions
|
|
@ -136,10 +136,14 @@ export default function PostInput({
|
|||
return {...style.input, maxHeight};
|
||||
}, [maxHeight, style.input]);
|
||||
|
||||
const handleAndroidKeyboard = () => {
|
||||
const handleAndroidKeyboardHide = () => {
|
||||
onBlur();
|
||||
};
|
||||
|
||||
const handleAndroidKeyboardShow = () => {
|
||||
onFocus();
|
||||
};
|
||||
|
||||
const onBlur = useCallback(() => {
|
||||
updateDraftMessage(serverUrl, channelId, rootId, value);
|
||||
setIsFocused(false);
|
||||
|
|
@ -252,13 +256,16 @@ export default function PostInput({
|
|||
}, [serverUrl, channelId, rootId, value]);
|
||||
|
||||
useEffect(() => {
|
||||
let keyboardListener: EmitterSubscription | undefined;
|
||||
let keyboardHideListener: EmitterSubscription | undefined;
|
||||
let keyboardShowListener: EmitterSubscription | undefined;
|
||||
if (Platform.OS === 'android') {
|
||||
keyboardListener = Keyboard.addListener('keyboardDidHide', handleAndroidKeyboard);
|
||||
keyboardHideListener = Keyboard.addListener('keyboardDidHide', handleAndroidKeyboardHide);
|
||||
keyboardShowListener = Keyboard.addListener('keyboardDidShow', handleAndroidKeyboardShow);
|
||||
}
|
||||
|
||||
return (() => {
|
||||
keyboardListener?.remove();
|
||||
keyboardShowListener?.remove();
|
||||
keyboardHideListener?.remove();
|
||||
});
|
||||
}, []);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue