File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ type Props = NativeStackScreenProps<FileStackParams, 'FileDetail'>;
4242const FileDetail : React . FC < Props > = ( { route, navigation } ) => {
4343 const { disableAnimation, ...file } = route . params ;
4444
45+ const isSearch = navigation . getState ( ) . routeNames . includes ( 'Search' as any ) ;
46+
4547 const theme = useTheme ( ) ;
4648 const toast = useToast ( ) ;
4749 const { showDetail, showMaster, toggleMaster } = useContext ( SplitViewContext ) ;
@@ -126,7 +128,7 @@ const FileDetail: React.FC<Props> = ({ route, navigation }) => {
126128 DeviceInfo . isTablet ( ) || DeviceInfo . isMac ( ) ? showMaster : undefined ,
127129 headerRight : ( ) => (
128130 < View style = { [ Styles . flexRow , { justifyContent : 'flex-end' } ] } >
129- { ( DeviceInfo . isTablet ( ) || DeviceInfo . isMac ( ) ) && (
131+ { ( DeviceInfo . isTablet ( ) || DeviceInfo . isMac ( ) ) && ! isSearch && (
130132 < IconButton
131133 onPress = { ( ) => toggleMaster ( ! showMaster ) }
132134 icon = { props => (
@@ -173,7 +175,7 @@ const FileDetail: React.FC<Props> = ({ route, navigation }) => {
173175 </ View >
174176 ) ,
175177 unstable_headerRightItems : ( ) => [
176- ...( DeviceInfo . isTablet ( ) || DeviceInfo . isMac ( )
178+ ...( ( DeviceInfo . isTablet ( ) || DeviceInfo . isMac ( ) ) && ! isSearch
177179 ? [
178180 {
179181 type : 'button' ,
You can’t perform that action at this time.
0 commit comments