Skip to content

Commit

Permalink
Merge pull request Expensify#43250 from bernhardoj/fix/43120-openrepo…
Browse files Browse the repository at this point in the history
…rt-twice-when-open-thread

Fix opening a thread calls OpenReport twice
  • Loading branch information
madmax330 authored Jun 10, 2024
2 parents bb10b8b + f801dc8 commit cd77d59
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/components/ReportActionItem/MoneyRequestAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as IOUUtils from '@libs/IOUUtils';
import Navigation from '@libs/Navigation/Navigation';
import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import type {ContextMenuAnchor} from '@pages/home/report/ContextMenu/ReportActionContextMenu';
import * as Report from '@userActions/Report';
import CONST from '@src/CONST';
import type {TranslationPaths} from '@src/languages/types';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -92,7 +91,6 @@ function MoneyRequestAction({
}

const childReportID = action?.childReportID ?? '0';
Report.openReport(childReportID);
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(childReportID));
};

Expand Down
1 change: 0 additions & 1 deletion src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,6 @@ function navigateToAndOpenReportWithAccountIDs(participantAccountIDs: number[])
*/
function navigateToAndOpenChildReport(childReportID = '0', parentReportAction: Partial<ReportAction> = {}, parentReportID = '0') {
if (childReportID !== '0') {
openReport(childReportID);
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(childReportID));
} else {
const participantAccountIDs = [...new Set([currentUserAccountID, Number(parentReportAction.actorAccountID)])];
Expand Down

0 comments on commit cd77d59

Please sign in to comment.