Skip to content

Commit

Permalink
fixing copy to clipboard mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
rlinoz committed Jul 30, 2024
1 parent 6065516 commit 16d62f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/libs/Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
import {ExpensiMark} from 'expensify-common';
import Onyx from 'react-native-onyx';
import ONYXKEYS from '@src/ONYXKEYS';
import * as Localize from './Localize';
import Log from './Log';
import {getEffectiveDisplayName} from './PersonalDetailsUtils';
import * as ReportConnection from './ReportConnection';

const accountIDToNameMap: Record<string, string> = {};
Expand All @@ -17,7 +15,7 @@ Onyx.connect({
return;
}

accountIDToNameMap[personalDetails.accountID] = getEffectiveDisplayName(personalDetails) ?? Localize.translateLocal('common.hidden');
accountIDToNameMap[personalDetails.accountID] = personalDetails.login ?? personalDetails.displayName ?? String(personalDetails.accountID);
});
},
});
Expand Down
4 changes: 2 additions & 2 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ function getReportActionMessageFragments(action: ReportAction): Message[] {
}

if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION)) {
const message = `${Localize.translateLocal('roomChangeLog.updateRoomDescription')} ${getOriginalMessage(action)?.description}`;
const message = getUpdateRoomDescriptionMessage(action);
return [{text: message, html: `<muted-text>${message}</muted-text>`, type: 'COMMENT'}];
}

Expand Down Expand Up @@ -1585,7 +1585,7 @@ function getExportIntegrationActionFragments(reportAction: OnyxEntry<ReportActio
function getUpdateRoomDescriptionMessage(reportAction: ReportAction): string {
const originalMessage = getOriginalMessage(reportAction) as OriginalMessageChangeLog;
if (originalMessage?.description) {
return `${Localize.translateLocal('roomChangeLog.updateRoomDescription')} ${Parser.htmlToText(originalMessage?.description)}`;
return `${Localize.translateLocal('roomChangeLog.updateRoomDescription')} ${originalMessage?.description}`;
}

return Localize.translateLocal('roomChangeLog.clearRoomDescription');
Expand Down
3 changes: 0 additions & 3 deletions src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,6 @@ function ReportActionItem({
children = <ReportActionItemBasicMessage message={translate('iou.unheldExpense')} />;
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.MERGED_WITH_CASH_TRANSACTION) {
children = <ReportActionItemBasicMessage message={translate('systemMessage.mergedWithCashTransaction')} />;
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) {
const message = ReportActionsUtils.getUpdateRoomDescriptionMessage(action);
children = <ReportActionItemBasicMessage message={message} />;
} else if (ReportActionsUtils.isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.DISMISSED_VIOLATION)) {
children = <ReportActionItemBasicMessage message={ReportActionsUtils.getDismissedViolationMessageText(ReportActionsUtils.getOriginalMessage(action))} />;
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_TAG) {
Expand Down

0 comments on commit 16d62f2

Please sign in to comment.