diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 0d0552d51e48..4cf6184554ab 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -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, @@ -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) && diff --git a/tests/ui/UnreadIndicatorsTest.js b/tests/ui/UnreadIndicatorsTest.js index 5d24acae594d..6ddd5a86e4b2 100644 --- a/tests/ui/UnreadIndicatorsTest.js +++ b/tests/ui/UnreadIndicatorsTest.js @@ -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();