Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/libs/Navigation/NavigationRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ function NavigationRoot(props) {
const navigationStateRef = useRef(undefined);
const firstRenderRef = useRef(true);

const {updateCurrentReportID} = useCurrentReportID();
const {isSmallScreenWidth} = useWindowDimensions();

useEffect(() => {
if (firstRenderRef.current) {
// we don't want to make the report back button go back to LHN if the user
Expand All @@ -63,14 +66,11 @@ function NavigationRoot(props) {
firstRenderRef.current = false;
return;
}
if (!props.isSmallScreenWidth) {
if (!isSmallScreenWidth) {
return;
}
Navigation.setShouldPopAllStateOnUP();
}, [props.isSmallScreenWidth]);

const {updateCurrentReportID} = useCurrentReportID();
const {isSmallScreenWidth} = useWindowDimensions();
}, [isSmallScreenWidth]);

const prevStatusBarBackgroundColor = useRef(themeColors.appBG);
const statusBarBackgroundColor = useRef(themeColors.appBG);
Expand Down