Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions src/components/LHNOptionsList/OptionRowLHNData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ function OptionRowLHNData({
const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID);
const {login} = useCurrentUserPersonalDetails();
const [policyTags] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_TAGS}${fullReport?.policyID}`);
const [fullReportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${fullReport?.reportID}`);

const card = useGetExpensifyCardFromReportAction({reportAction: lastAction, policyID: fullReport?.policyID});

Expand Down Expand Up @@ -157,7 +156,7 @@ function OptionRowLHNData({
reportAttributesDerived,
policyTags,
currentUserLogin: login ?? '',
reportActions: fullReportActions,
reportActions,
});

// For single-sender IOUs, trim to the sender's avatar to match the header.
Expand Down
5 changes: 1 addition & 4 deletions src/pages/inbox/sidebar/SidebarLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type {EdgeInsets} from 'react-native-safe-area-context';
import type {ValueOf} from 'type-fest';
import LHNOptionsList from '@components/LHNOptionsList/LHNOptionsList';
import OptionsListSkeletonView from '@components/OptionsListSkeletonView';
import useConfirmReadyToOpenApp from '@hooks/useConfirmReadyToOpenApp';
import useOnyx from '@hooks/useOnyx';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useStyleUtils from '@hooks/useStyleUtils';
Expand Down Expand Up @@ -41,8 +40,6 @@ function SidebarLinks({insets, optionListItems, priorityMode = CONST.PRIORITY_MO
const {shouldUseNarrowLayout} = useResponsiveLayout();
const [isLoadingReportData = true] = useOnyx(ONYXKEYS.IS_LOADING_REPORT_DATA);

useConfirmReadyToOpenApp();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useConfirmReadyToOpenApp() is already called in BaseSidebarScreen (the parent component), so this was a duplicate invocation. The hook only needs to run once per screen.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that in the description, sorry haha


useEffect(() => {
ReportActionContextMenu.hideContextMenu(false);
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down Expand Up @@ -100,7 +97,7 @@ function SidebarLinks({insets, optionListItems, priorityMode = CONST.PRIORITY_MO
onFirstItemRendered={setSidebarLoaded}
/>
{isLoadingReportData && optionListItems?.length === 0 && (
<View style={[StyleSheet.absoluteFillObject, styles.appBG, styles.mt3]}>
<View style={[StyleSheet.absoluteFill, styles.appBG, styles.mt3]}>
<OptionsListSkeletonView
shouldAnimate
reasonAttributes={sidebarSkeletonReasonAttributes}
Expand Down
Loading