Skip to content

Commit a1c2147

Browse files
committed
unnecessary code removed
1 parent e65e03e commit a1c2147

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

src/libs/ReportUtils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4997,7 +4997,6 @@ function shouldReportBeInOptionList({
49974997
report?.reportName === undefined ||
49984998
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
49994999
report?.isHidden ||
5000-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
50015000
(report?.participantAccountIDs?.length === 0 &&
50025001
!isChatThread(report) &&
50035002
!isPublicRoom(report) &&

src/libs/SidebarUtils.ts

-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import localeCompare from './LocaleCompare';
1818
import * as LocalePhoneNumber from './LocalePhoneNumber';
1919
import * as Localize from './Localize';
2020
import * as OptionsListUtils from './OptionsListUtils';
21-
import * as PersonalDetailsUtils from './PersonalDetailsUtils';
2221
import * as ReportActionsUtils from './ReportActionsUtils';
2322
import * as ReportUtils from './ReportUtils';
2423
import * as TaskUtils from './TaskUtils';
@@ -239,11 +238,6 @@ function getOptionData({
239238
participantAccountIDs = [report.ownerAccountID ?? 0];
240239
}
241240

242-
// TODO: this is added for the testing purposes only - should be removed once participants list of the system report is filled
243-
if (report.chatType === CONST.REPORT.CHAT_TYPE.SYSTEM) {
244-
participantAccountIDs = [report.ownerAccountID ?? 0, ...PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.NOTIFICATIONS])];
245-
}
246-
247241
const participantPersonalDetailList = Object.values(OptionsListUtils.getPersonalDetailsForAccountIDs(participantAccountIDs, personalDetails)) as PersonalDetails[];
248242
const personalDetail = participantPersonalDetailList[0] ?? {};
249243
const hasErrors = Object.keys(result.allReportErrors ?? {}).length !== 0;

src/libs/actions/Report.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -3090,8 +3090,7 @@ function completeOnboarding(
30903090
const targetEmail = isAccountIDOdd ? CONST.EMAIL.NOTIFICATIONS : CONST.EMAIL.CONCIERGE;
30913091

30923092
const actorAccountID = PersonalDetailsUtils.getAccountIDsByLogins([targetEmail])[0];
3093-
// TODO: using getSystemChat is rather not necessary if we could have participants list filled correctly
3094-
const targetChatReport = isAccountIDOdd ? ReportUtils.getSystemChat() : ReportUtils.getChatByParticipants([actorAccountID]);
3093+
const targetChatReport = ReportUtils.getChatByParticipants([actorAccountID]);
30953094
const {reportID: targetChatReportID = '', policyID: targetChatPolicyID = ''} = targetChatReport ?? {};
30963095

30973096
// Mention message

0 commit comments

Comments
 (0)