Skip to content

Commit 755b505

Browse files
authored
Merge pull request Expensify#65457 from Expensify/revert-65417-bugfix/kuba_nowakowski/go_back_to_OD
Revert "Fix go back to OD in hybridApp"
2 parents ee37988 + b6aabfd commit 755b505

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/components/ScreenWrapper/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,11 @@ function ScreenWrapper(
170170
const shouldOffsetMobileOfflineIndicator = displaySmallScreenOfflineIndicator && addSmallScreenOfflineIndicatorBottomSafeAreaPadding && isOffline;
171171

172172
const {initialURL} = useContext(InitialURLContext);
173-
const [isSingleNewDotEntry = false] = useOnyx(ONYXKEYS.IS_SINGLE_NEW_DOT_ENTRY, {canBeMissing: true});
173+
const [isSingleNewDotEntry] = useOnyx(ONYXKEYS.IS_SINGLE_NEW_DOT_ENTRY, {canBeMissing: true});
174174
const {setRootStatusBarEnabled} = useContext(CustomStatusBarAndBackgroundContext);
175175

176-
usePreventRemove(true, () => {
177-
const isOnInitialURL = initialURL === Navigation.getActiveRouteWithoutParams();
178-
const shouldGoBackToOldDot = isSingleNewDotEntry && isOnInitialURL;
179-
180-
if (!CONFIG.IS_HYBRID_APP || !shouldGoBackToOldDot) {
176+
usePreventRemove((isSingleNewDotEntry ?? false) && initialURL === Navigation.getActiveRouteWithoutParams(), () => {
177+
if (!CONFIG.IS_HYBRID_APP) {
181178
return;
182179
}
183180
HybridAppModule.closeReactNativeApp({shouldSignOut: false, shouldSetNVP: false});

0 commit comments

Comments
 (0)