@@ -15,9 +15,6 @@ import {formatCurrentUserToAttendee, updateIOUOwnerAndTotal} from '@libs/IOUUtil
1515import { formatPhoneNumber } from '@libs/LocalePhoneNumber' ;
1616import * as Localize from '@libs/Localize' ;
1717import Log from '@libs/Log' ;
18- import sharedDismissModalAndOpenReportInInboxTab from '@libs/Navigation/helpers/dismissModalAndOpenReportInInboxTab' ;
19- import isReportTopmostSplitNavigator from '@libs/Navigation/helpers/isReportTopmostSplitNavigator' ;
20- import navigateAfterExpenseCreate from '@libs/Navigation/helpers/navigateAfterExpenseCreate' ;
2118import Navigation from '@libs/Navigation/Navigation' ;
2219import { buildNextStepNew , buildOptimisticNextStep } from '@libs/NextStepUtils' ;
2320import * as NumberUtils from '@libs/NumberUtils' ;
@@ -74,7 +71,6 @@ import {
7471} from '@libs/TransactionUtils' ;
7572import ViolationsUtils from '@libs/Violations/ViolationsUtils' ;
7673import { buildOptimisticPolicyRecentlyUsedTags } from '@userActions/Policy/Tag' ;
77- import { mergeTransactionIdsHighlightOnSearchRoute } from '@userActions/Transaction' ;
7874import { getRemoveDraftTransactionsByIDsData , removeDraftTransactionsByIDs } from '@userActions/TransactionEdit' ;
7975import type { IOUAction , IOUActionParams } from '@src/CONST' ;
8076import CONST from '@src/CONST' ;
@@ -89,7 +85,7 @@ import type RecentlyUsedTags from '@src/types/onyx/RecentlyUsedTags';
8985import type { ReportNextStep } from '@src/types/onyx/Report' ;
9086import type ReportAction from '@src/types/onyx/ReportAction' ;
9187import type { OnyxData } from '@src/types/onyx/Request' ;
92- import type { SearchDataTypes , SearchResultDataType } from '@src/types/onyx/SearchResults' ;
88+ import type { SearchResultDataType } from '@src/types/onyx/SearchResults' ;
9389import type { Comment , Receipt , TransactionChanges , TransactionCustomUnit , WaypointCollection } from '@src/types/onyx/Transaction' ;
9490import { isEmptyObject } from '@src/types/utils/EmptyObject' ;
9591import type BasePolicyParams from './types/BasePolicyParams' ;
@@ -528,50 +524,6 @@ function getMoneyRequestPolicyTags({
528524 return getPolicyTagsData ( iouReportPolicyID ) ?? { } ;
529525}
530526
531- /**
532- * @private
533- * After finishing the action in RHP from the Inbox tab, besides dismissing the modal, we should open the report.
534- * If the action is done from the report RHP, then we just want to dismiss the money request flow screens.
535- * It is a helper function used only in this file.
536- */
537- function dismissModalAndOpenReportInInboxTab ( reportID ?: string , isInvoice ?: boolean ) {
538- const hasMultipleTransactions = Object . values ( allTransactions ) . filter ( ( transaction ) => transaction ?. reportID === reportID ) . length > 0 ;
539- sharedDismissModalAndOpenReportInInboxTab ( reportID , isInvoice , hasMultipleTransactions ) ;
540- }
541-
542- /**
543- * Marks a transaction for highlight on the Search page when the expense was created
544- * from the global create button and the user is not on the Inbox tab.
545- */
546- function highlightTransactionOnSearchRouteIfNeeded ( isFromGlobalCreate : boolean | undefined , transactionID : string | undefined , dataType : SearchDataTypes ) {
547- if ( ! isFromGlobalCreate || isReportTopmostSplitNavigator ( ) || ! transactionID ) {
548- return ;
549- }
550- mergeTransactionIdsHighlightOnSearchRoute ( dataType , { [ transactionID ] : true } ) ;
551- }
552-
553- /**
554- * Helper to navigate after an expense is created in order to standardize the post‑creation experience
555- * when creating an expense from the global create button.
556- * If the expense is created from the global create button then:
557- * - If it is created on the inbox tab, it will open the chat report containing that expense.
558- * - If it is created elsewhere, it will navigate to Reports > Expense and highlight the newly created expense.
559- */
560- function handleNavigateAfterExpenseCreate ( {
561- activeReportID,
562- transactionID,
563- isFromGlobalCreate,
564- isInvoice,
565- } : {
566- activeReportID ?: string ;
567- transactionID ?: string ;
568- isFromGlobalCreate ?: boolean ;
569- isInvoice ?: boolean ;
570- } ) {
571- const hasMultipleTransactions = Object . values ( allTransactions ) . filter ( ( transaction ) => transaction ?. reportID === activeReportID ) . length > 0 ;
572- navigateAfterExpenseCreate ( { activeReportID, transactionID, isFromGlobalCreate, isInvoice, hasMultipleTransactions} ) ;
573- }
574-
575527/**
576528 * Build a minimal transaction record for formula computation in buildOptimisticExpenseReport.
577529 * This allows formulas like {report:startdate}, {report:expensescount} to work correctly.
@@ -2727,7 +2679,6 @@ export {
27272679 createDraftTransaction ,
27282680 getIOURequestPolicyID ,
27292681 initMoneyRequest ,
2730- dismissModalAndOpenReportInInboxTab ,
27312682 resetDraftTransactionsCustomUnit ,
27322683 setCustomUnitRateID ,
27332684 setGPSTransactionDraftData ,
@@ -2785,12 +2736,10 @@ export {
27852736 getMoneyRequestPolicyTags ,
27862737 setMoneyRequestTimeRate ,
27872738 setMoneyRequestTimeCount ,
2788- handleNavigateAfterExpenseCreate ,
27892739 buildMinimalTransactionForFormula ,
27902740 buildOnyxDataForMoneyRequest ,
27912741 getMoneyRequestInformation ,
27922742 getTransactionWithPreservedLocalReceiptSource ,
2793- highlightTransactionOnSearchRouteIfNeeded ,
27942743} ;
27952744export type {
27962745 GPSPoint as GpsPoint ,
0 commit comments