Skip to content

Commit 2178852

Browse files
committed
Remove deprecated
1 parent 6708959 commit 2178852

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/libs/actions/Report.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4314,7 +4314,7 @@ function resolveActionableMentionWhisper(
43144314
reportID: string | undefined,
43154315
reportAction: OnyxEntry<ReportAction>,
43164316
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION> | ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER>,
4317-
policyID: string | undefined,
4317+
policy?: OnyxEntry<Policy>,
43184318
) {
43194319
if (!reportAction || !reportID) {
43204320
return;
@@ -4323,7 +4323,7 @@ function resolveActionableMentionWhisper(
43234323
if (ReportActionsUtils.isActionableMentionWhisper(reportAction) && resolution === CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE) {
43244324
const actionOriginalMessage = ReportActionsUtils.getOriginalMessage(reportAction);
43254325

4326-
const policy = getPolicy(policyID);
4326+
const policyID = policy?.id;
43274327

43284328
if (actionOriginalMessage && policyID) {
43294329
const currentUserDetails = allPersonalDetails?.[getCurrentUserAccountID()];
@@ -4422,7 +4422,7 @@ function resolveActionableMentionConfirmWhisper(
44224422
reportAction: OnyxEntry<ReportAction>,
44234423
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER>,
44244424
) {
4425-
resolveActionableMentionWhisper(reportID, reportAction, resolution, undefined);
4425+
resolveActionableMentionWhisper(reportID, reportAction, resolution);
44264426
}
44274427

44284428
function resolveActionableReportMentionWhisper(

src/pages/home/report/PureReportActionItem.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ type PureReportActionItemProps = {
322322
reportId: string | undefined,
323323
reportAction: OnyxEntry<OnyxTypes.ReportAction>,
324324
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION>,
325-
policyId: string | undefined,
325+
policy: OnyxEntry<OnyxTypes.Policy>,
326326
) => void;
327327

328328
/** Whether the provided report is a closed expense report with no expenses */
@@ -817,34 +817,34 @@ function PureReportActionItem({
817817
{
818818
text: 'actionableMentionWhisperOptions.inviteToSubmitExpense',
819819
key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE}`,
820-
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE, report?.policyID),
820+
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE, policy),
821821
isMediumSized: true,
822822
},
823823
{
824824
text: 'actionableMentionWhisperOptions.inviteToChat',
825825
key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE}`,
826-
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, report?.policyID),
826+
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, policy),
827827
isMediumSized: true,
828828
},
829829
{
830830
text: 'actionableMentionWhisperOptions.nothing',
831831
key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING}`,
832-
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, report?.policyID),
832+
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, policy),
833833
isMediumSized: true,
834834
},
835835
];
836836
}, [
837837
action,
838+
userBillingFundID,
838839
isActionableWhisper,
839-
report,
840840
reportID,
841-
userBillingFundID,
841+
originalReportID,
842+
isBetaEnabled,
842843
createDraftTransactionAndNavigateToParticipantSelector,
843844
dismissTrackExpenseActionableWhisper,
844845
resolveActionableReportMentionWhisper,
845846
resolveActionableMentionWhisper,
846-
originalReportID,
847-
isBetaEnabled,
847+
policy,
848848
]);
849849

850850
/**

0 commit comments

Comments
 (0)