Skip to content

Commit

Permalink
Merge pull request #22269 from Expensify/beaman-removeActionAccountEm…
Browse files Browse the repository at this point in the history
…ailAgain

Remove few instances of `reportAction.actorEmail` for email -> accountID migration
  • Loading branch information
yuwenmemon authored Jul 5, 2023
2 parents 6e03e54 + 675fd1c commit 0f36281
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ Onyx.connect({
},
});

let loginList;
Onyx.connect({
key: ONYXKEYS.LOGIN_LIST,
callback: (val) => (loginList = _.isEmpty(val) ? [] : _.keys(val)),
});

let preferredLocale = CONST.LOCALES.DEFAULT;
Onyx.connect({
key: ONYXKEYS.NVP_PREFERRED_LOCALE,
Expand Down Expand Up @@ -2110,7 +2104,7 @@ function chatIncludesChronos(report) {
*/
function canFlagReportAction(reportAction, reportID) {
return (
!loginList.includes(reportAction.actorEmail) &&
reportAction.actorAccountID !== currentUserAccountID &&
reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT &&
!ReportActionsUtils.isDeletedAction(reportAction) &&
!ReportActionsUtils.isCreatedTaskReportAction(reportAction) &&
Expand Down
1 change: 0 additions & 1 deletion tests/ui/UnreadIndicatorsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,6 @@ describe('Unread Indicators', () => {
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${REPORT_ID}`, {
lastMessageText: lastReportAction.message[0].text,
lastVisibleActionCreated: DateUtils.getDBTime(lastReportAction.timestamp),
lastActorEmail: lastReportAction.actorEmail,
reportID: REPORT_ID,
});
return waitForPromisesToResolve();
Expand Down

0 comments on commit 0f36281

Please sign in to comment.