File tree Expand file tree Collapse file tree
src/components/ScreenWrapper Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,11 +170,14 @@ function ScreenWrapper(
170170 const shouldOffsetMobileOfflineIndicator = displaySmallScreenOfflineIndicator && addSmallScreenOfflineIndicatorBottomSafeAreaPadding && isOffline ;
171171
172172 const { initialURL} = useContext ( InitialURLContext ) ;
173- const [ isSingleNewDotEntry ] = useOnyx ( ONYXKEYS . IS_SINGLE_NEW_DOT_ENTRY , { canBeMissing : true } ) ;
173+ const [ isSingleNewDotEntry = false ] = useOnyx ( ONYXKEYS . IS_SINGLE_NEW_DOT_ENTRY , { canBeMissing : true } ) ;
174174 const { setRootStatusBarEnabled} = useContext ( CustomStatusBarAndBackgroundContext ) ;
175175
176- usePreventRemove ( ( isSingleNewDotEntry ?? false ) && initialURL === Navigation . getActiveRouteWithoutParams ( ) , ( ) => {
177- if ( ! CONFIG . IS_HYBRID_APP ) {
176+ usePreventRemove ( true , ( ) => {
177+ const isOnInitialURL = initialURL === Navigation . getActiveRouteWithoutParams ( ) ;
178+ const shouldGoBackToOldDot = isSingleNewDotEntry && isOnInitialURL ;
179+
180+ if ( ! CONFIG . IS_HYBRID_APP || ! shouldGoBackToOldDot ) {
178181 return ;
179182 }
180183 HybridAppModule . closeReactNativeApp ( { shouldSignOut : false , shouldSetNVP : false } ) ;
You can’t perform that action at this time.
0 commit comments