Skip to content

Commit

Permalink
Merge pull request #51724 from mkzie2/mkzie2-issue/50572
Browse files Browse the repository at this point in the history
fix: sound plays before paying held expense report
  • Loading branch information
carlosmiceli authored Nov 15, 2024
2 parents 902c4e3 + 8206ad0 commit ce90360
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/ProcessMoneyReportHoldMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import useLocalize from '@hooks/useLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import Navigation from '@libs/Navigation/Navigation';
import {isLinkedTransactionHeld} from '@libs/ReportActionsUtils';
import playSound, {SOUNDS} from '@libs/Sound';
import * as IOU from '@userActions/IOU';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
Expand Down Expand Up @@ -74,6 +75,7 @@ function ProcessMoneyReportHoldMenu({
if (startAnimation) {
startAnimation();
}
playSound(SOUNDS.SUCCESS);
IOU.payMoneyRequest(paymentType, chatReport, moneyRequestReport, full);
}
onClose();
Expand Down
4 changes: 3 additions & 1 deletion src/components/SettlementButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ function SettlementButton({
return;
}

playSound(SOUNDS.SUCCESS);
if (!ReportUtils.hasHeldExpenses(iouReport?.reportID)) {
playSound(SOUNDS.SUCCESS);
}
onPress(iouPaymentType);
};

Expand Down

0 comments on commit ce90360

Please sign in to comment.