Skip to content

Commit

Permalink
Merge pull request #53430 from nkdengineer/fix/53077
Browse files Browse the repository at this point in the history
fix: paying expense and canceling payment don't scroll down to comments
  • Loading branch information
jasperhuangg authored Dec 27, 2024
2 parents 1ba5d4d + 85fe866 commit 19608ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7768,6 +7768,7 @@ function cancelPayment(expenseReport: OnyxEntry<OnyxTypes.Report>, chatReport: O
key: `${ONYXKEYS.COLLECTION.REPORT}${expenseReport.reportID}`,
value: {
...expenseReport,
lastVisibleActionCreated: optimisticReportAction?.created,
lastMessageText: ReportActionsUtils.getReportActionText(optimisticReportAction),
lastMessageHtml: ReportActionsUtils.getReportActionHtml(optimisticReportAction),
stateNum,
Expand Down Expand Up @@ -7871,6 +7872,8 @@ function cancelPayment(expenseReport: OnyxEntry<OnyxTypes.Report>, chatReport: O
},
{optimisticData, successData, failureData},
);
Navigation.dismissModal();
Report.notifyNewAction(expenseReport.reportID, userAccountID);
}

/**
Expand Down Expand Up @@ -7930,6 +7933,7 @@ function payMoneyRequest(paymentType: PaymentMethodType, chatReport: OnyxTypes.R

playSound(SOUNDS.SUCCESS);
API.write(apiCommand, params, {optimisticData, successData, failureData});
Report.notifyNewAction(iouReport?.reportID ?? '', userAccountID);
}

function payInvoice(paymentMethodType: PaymentMethodType, chatReport: OnyxTypes.Report, invoiceReport: OnyxEntry<OnyxTypes.Report>, payAsBusiness = false) {
Expand Down

0 comments on commit 19608ed

Please sign in to comment.