From 274932ce5d46529526752edf16a9978465fc5727 Mon Sep 17 00:00:00 2001 From: Martin Santangelo Date: Wed, 23 Oct 2024 11:13:36 -0300 Subject: [PATCH] Fix keyboard avoiding on the chat screen --- src/modules/chat/components/MessageList.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/chat/components/MessageList.tsx b/src/modules/chat/components/MessageList.tsx index b608889c2..2c17ef9e5 100644 --- a/src/modules/chat/components/MessageList.tsx +++ b/src/modules/chat/components/MessageList.tsx @@ -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 { @@ -40,10 +40,13 @@ function MessageFlatList({ isRequest }: Props) { [send], ); + const statusBarHeight = StatusBar.currentHeight || 0; + return (