Skip to content

Commit

Permalink
Add default chat report name to const
Browse files Browse the repository at this point in the history
  • Loading branch information
stitesExpensify committed Nov 7, 2022
1 parent dc8f2c5 commit 486fa63
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
10 changes: 10 additions & 0 deletions ios/NewExpensify.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ const CONST = {
MAX_ROOM_NAME_LENGTH: 80,
LAST_MESSAGE_TEXT_MAX_LENGTH: 200,
OWNER_EMAIL_FAKE: '__FAKE__',
DEFAULT_REPORT_NAME: 'Chat Report',
},
COMPOSER: {
MAX_LINES: 16,
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ function buildOptimisticIOUReportAction(sequenceNumber, type, amount, currency,
*/
function buildOptimisticChatReport(
participantList,
reportName = 'Chat Report',
reportName = CONST.REPORT.DEFAULT_REPORT_NAME,
chatType = '',
policyID = CONST.POLICY.OWNER_EMAIL_FAKE,
ownerEmail = CONST.REPORT.OWNER_EMAIL_FAKE,
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/UnreadIndicatorsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function signInAndGetAppWithUnreadChat() {
// Simulate setting an unread report and personal details
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${REPORT_ID}`, {
reportID: REPORT_ID,
reportName: 'Chat Report',
reportName: CONST.REPORT.DEFAULT_REPORT_NAME,
maxSequenceNumber: 9,
lastReadSequenceNumber: 1,
lastMessageTimestamp: MOMENT_TEN_MINUTES_AGO.utc().valueOf(),
Expand Down Expand Up @@ -264,7 +264,7 @@ describe('Unread Indicators', () => {
const NEW_REPORT_CREATED_MOMENT = moment();
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${NEW_REPORT_ID}`, {
reportID: NEW_REPORT_ID,
reportName: 'Chat Report',
reportName: CONST.REPORT.DEFAULT_REPORT_NAME,
maxSequenceNumber: 1,
lastReadSequenceNumber: 0,
lastMessageTimestamp: NEW_REPORT_CREATED_MOMENT.utc().valueOf(),
Expand Down

0 comments on commit 486fa63

Please sign in to comment.