Skip to content

Commit 0a8295f

Browse files
authored
Allow inbox to load when behind a convo (keybase#25591)
1 parent ce3fac5 commit 0a8295f

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎shared/app/index.native.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import {Provider, useDispatch} from 'react-redux'
1111
import {SafeAreaProvider, initialWindowMetrics} from 'react-native-safe-area-context'
1212
import {makeEngine} from '../engine'
1313
import {GestureHandlerRootView} from 'react-native-gesture-handler'
14+
import {enableFreeze} from 'react-native-screens'
15+
enableFreeze(true)
1416

1517
type ConfigureStore = ReturnType<typeof makeStore>
1618
let _store: ConfigureStore | undefined

‎shared/chat/inbox/container.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ const InboxWrapper = React.memo(function InboxWrapper(props: WrapperProps) {
147147

148148
const buttonWidth = 132
149149
export const getOptions = () => ({
150+
freezeOnBlur: false, // let it render even if not visible
150151
headerLeft: () => <Kb.HeaderLeftBlank />,
151152
headerLeftContainerStyle: {
152153
...Common.defaultNavigationOptions.headerLeftContainerStyle,
@@ -240,7 +241,6 @@ const Connected = Container.connect(
240241
}
241242
}
242243
}
243-
244244
return {
245245
isSearching: stateProps.isSearching,
246246
navKey,

‎shared/router-v2/router.native.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ import {HeaderLeftCancel2} from '../common-adapters/header-hoc'
1616
import {NavigationContainer, getFocusedRouteNameFromRoute} from '@react-navigation/native'
1717
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'
1818
import {modalRoutes, routes, loggedOutRoutes, tabRoots} from './routes'
19-
import {enableFreeze} from 'react-native-screens'
2019
import {createNativeStackNavigator} from '@react-navigation/native-stack'
2120

22-
enableFreeze()
23-
2421
if (module.hot) {
2522
module.hot.accept('', () => {
2623
tabScreensCache.clear()

0 commit comments

Comments
 (0)