diff --git a/app/components/navigation_header/index.tsx b/app/components/navigation_header/index.tsx index 72baa04b0..7c474e1a1 100644 --- a/app/components/navigation_header/index.tsx +++ b/app/components/navigation_header/index.tsx @@ -62,13 +62,12 @@ const NavigationHeader = forwardRef(({ const {largeHeight, defaultHeight, headerOffset} = useHeaderHeight(); const containerHeight = useAnimatedStyle(() => { - const minHeight = defaultHeight; const value = -(scrollValue?.value || 0); const calculatedHeight = (isLargeTitle ? largeHeight : defaultHeight) + value; const height = lockValue?.value ? lockValue.value : calculatedHeight; return { - height: Math.max(height, minHeight), - minHeight, + height: Math.max(height, defaultHeight), + minHeight: defaultHeight, maxHeight: largeHeight + MAX_OVERSCROLL, }; }); @@ -90,26 +89,25 @@ const NavigationHeader = forwardRef(({ ), [lockValue, headerOffset]); return ( - <> - -
- {isLargeTitle && + +
+ {isLargeTitle && (({ title={title} translateY={translateY} /> - } - {hasSearch && + } + {hasSearch && (({ topStyle={searchTopStyle} ref={ref} /> - } - - + } + ); }); diff --git a/app/screens/home/search/search.tsx b/app/screens/home/search/search.tsx index 1c285a370..1c473dade 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, KeyboardAvoidingView} from 'react-native'; +import {FlatList, type LayoutChangeEvent, Platform, StyleSheet, type ViewStyle, KeyboardAvoidingView, Keyboard} from 'react-native'; import HWKeyboardEvent from 'react-native-hw-keyboard-event'; import Animated, {useAnimatedStyle, useDerivedValue, withTiming, type AnimatedStyle} from 'react-native-reanimated'; import {type Edge, SafeAreaView, useSafeAreaInsets} from 'react-native-safe-area-context'; @@ -149,6 +149,7 @@ const SearchScreen = ({teamId, teams}: Props) => { const handleClearSearch = useCallback(() => { clearRef.current = true; + Keyboard.dismiss(); resetToInitial(); }, [resetToInitial]);