Skip to content

Commit

Permalink
Merge branch 'fix/input-keyboard-avoid-android' into 'develop'
Browse files Browse the repository at this point in the history
Fix keyboard avoiding on the chat screen

See merge request minds/mobile-native!2813
  • Loading branch information
msantang78 committed Oct 23, 2024
2 parents d553378 + 274932c commit 170bb1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/chat/components/MessageList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback, useRef } from 'react';

import Message from './Message';
import { FlatList, StyleSheet } from 'react-native';
import { FlatList, StatusBar, StyleSheet } from 'react-native';
import ChatInput from './ChatInput';
import { showMessageMenu } from './MessageMenu';
import {
Expand Down Expand Up @@ -40,10 +40,13 @@ function MessageFlatList({ isRequest }: Props) {
[send],
);

const statusBarHeight = StatusBar.currentHeight || 0;

return (
<KeyboardAvoidingView
behavior="padding"
enabled
keyboardVerticalOffset={statusBarHeight}
style={sp.styles.style.flexContainer}>
<FlatList
ref={listRef}
Expand Down

0 comments on commit 170bb1b

Please sign in to comment.