From ae834fa00f96eeba61d32ee5e7cbcc7c7dce2b03 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 20 Feb 2024 17:40:43 +0800 Subject: [PATCH 1/2] set ready to open app on sidebar screen regardless of the screen size --- src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts | 3 --- src/pages/home/sidebar/SidebarLinks.js | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts b/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts index b4bb56262860..fe44ca4d864a 100644 --- a/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts +++ b/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts @@ -71,7 +71,6 @@ function ReportScreenIDSetter({route, reports, policies, policyMembers = {}, nav if (reportActionID && !regexValidReportActionID.test(reportActionID)) { navigation.setParams({reportActionID: ''}); } - App.confirmReadyToOpenApp(); return; } @@ -93,8 +92,6 @@ function ReportScreenIDSetter({route, reports, policies, policyMembers = {}, nav // in that case the reportID is undefined if (reportID) { navigation.setParams({reportID: String(reportID)}); - } else { - App.confirmReadyToOpenApp(); } }, [route, navigation, reports, canUseDefaultRooms, policies, isFirstTimeNewExpensifyUser, reportMetadata, activeWorkspaceID, policyMembers, accountID]); diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 9431bae68d8a..e872bbad008a 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -51,11 +51,8 @@ function SidebarLinks({onLinkClick, insets, optionListItems, isLoading, priority const {isSmallScreenWidth} = useWindowDimensions(); useEffect(() => { - if (!isSmallScreenWidth) { - return; - } App.confirmReadyToOpenApp(); - }, [isSmallScreenWidth]); + }, []); useEffect(() => { InteractionManager.runAfterInteractions(() => { From dce04be3446b7ceb7d6dd6bd231c1db8e6210ab6 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 20 Feb 2024 17:52:39 +0800 Subject: [PATCH 2/2] remove unused import --- src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts b/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts index fe44ca4d864a..529f0f3d31a7 100644 --- a/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts +++ b/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts @@ -5,7 +5,6 @@ import useActiveWorkspace from '@hooks/useActiveWorkspace'; import usePermissions from '@hooks/usePermissions'; import {getPolicyMembersByIdWithoutCurrentUser} from '@libs/PolicyUtils'; import * as ReportUtils from '@libs/ReportUtils'; -import * as App from '@userActions/App'; import ONYXKEYS from '@src/ONYXKEYS'; import type {Policy, PolicyMembers, Report, ReportMetadata} from '@src/types/onyx'; import type {ReportScreenWrapperProps} from './ReportScreenWrapper';