Skip to content

Commit

Permalink
fix copy to clipboard of hold and unhold actions
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Mar 4, 2024
1 parent af0f6a3 commit 7bd676a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/home/report/ContextMenu/ContextMenuActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import EmailUtils from '@libs/EmailUtils';
import * as Environment from '@libs/Environment/Environment';
import fileDownload from '@libs/fileDownload';
import getAttachmentDetails from '@libs/fileDownload/getAttachmentDetails';
import * as Localize from '@libs/Localize';
import ModifiedExpenseMessage from '@libs/ModifiedExpenseMessage';
import Navigation from '@libs/Navigation/Navigation';
import Permissions from '@libs/Permissions';
Expand Down Expand Up @@ -372,6 +373,10 @@ const ContextMenuActions: ContextMenuAction[] = [
} else if (ReportActionsUtils.isActionableMentionWhisper(reportAction)) {
const mentionWhisperMessage = ReportActionsUtils.getActionableMentionWhisperMessage(reportAction);
setClipboardMessage(mentionWhisperMessage);
} else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.HOLD) {
Clipboard.setString(Localize.translateLocal('iou.heldRequest', {comment: reportAction.message?.[1]?.text ?? ''}));
} else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.UNHOLD) {
Clipboard.setString(Localize.translateLocal('iou.unheldRequest'));
} else if (content) {
setClipboardMessage(content);
} else if (messageText) {
Expand Down

0 comments on commit 7bd676a

Please sign in to comment.