Skip to content

Commit

Permalink
remove outdated condition + fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
s77rt committed Jun 12, 2024
1 parent 3eeddae commit f24f4c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/ReportWelcomeText.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {useMemo} from 'react';
import {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {useOnyx, withOnyx} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
Expand Down
8 changes: 1 addition & 7 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1617,13 +1617,7 @@ function getReportRecipientAccountIDs(report: OnyxEntry<Report>, currentLoginAcc
}

let finalParticipantAccountIDs: number[] = [];
if (isMoneyRequestReport(report)) {
// For money requests i.e the IOU (1:1 person) and Expense (1:* person) reports, use the full `participants`
// and add the `ownerAccountId`. Money request reports don't add `ownerAccountId` in `participants` array
const defaultParticipantAccountIDs = Object.keys(finalReport?.participants ?? {}).map(Number);
const setOfParticipantAccountIDs = new Set<number>(report?.ownerAccountID ? [...defaultParticipantAccountIDs, report.ownerAccountID] : defaultParticipantAccountIDs);
finalParticipantAccountIDs = [...setOfParticipantAccountIDs];
} else if (isTaskReport(report)) {
if (isTaskReport(report)) {
// Task reports `managerID` will change when assignee is changed, in that case the old `managerID` is still present in `participants`
// along with the new one. We only need the `managerID` as a participant here.
finalParticipantAccountIDs = report?.managerID ? [report?.managerID] : [];
Expand Down

0 comments on commit f24f4c3

Please sign in to comment.