diff --git a/app/screens/home/search/search.tsx b/app/screens/home/search/search.tsx index a18515820..cfa0107b4 100644 --- a/app/screens/home/search/search.tsx +++ b/app/screens/home/search/search.tsx @@ -4,7 +4,7 @@ import {useIsFocused, useNavigation} from '@react-navigation/native'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {useIntl} from 'react-intl'; -import {FlatList, type LayoutChangeEvent, Platform, StyleSheet, type ViewStyle} from 'react-native'; +import {FlatList, type LayoutChangeEvent, Platform, StyleSheet, type ViewStyle, KeyboardAvoidingView} from 'react-native'; import HWKeyboardEvent from 'react-native-hw-keyboard-event'; import Animated, {useAnimatedStyle, useDerivedValue, withTiming} from 'react-native-reanimated'; import {type Edge, SafeAreaView, useSafeAreaInsets} from 'react-native-safe-area-context'; @@ -363,10 +363,14 @@ const SearchScreen = ({teamId, teams}: Props) => { onLayout={onLayout} testID='search_messages.screen' > - - - - {lastSearchedValue && !loading && + + + + + {lastSearchedValue && !loading &&
{ selectedFilter={filter} teams={teams} /> - } - - {!showResults && + } + + {!showResults && { ref={scrollRef} renderItem={renderInitialOrLoadingItem} /> - } - {showResults && !loading && + } + {showResults && !loading && { scrollPaddingTop={lockValue.value} fileChannelIds={fileChannelIds} /> - } - + } + + {searchIsFocused &&