Skip to content

Commit b9a6938

Browse files
committed
fix move check to report uitls
1 parent a3f5a30 commit b9a6938

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/libs/OptionsListUtils.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -1866,6 +1866,8 @@ function getOptions(
18661866
isInFocusMode: false,
18671867
excludeEmptyChats: false,
18681868
includeSelfDM,
1869+
login: option.login,
1870+
includeDomainEmail,
18691871
});
18701872
});
18711873

@@ -1915,10 +1917,6 @@ function getOptions(
19151917
return;
19161918
}
19171919

1918-
if (Str.isDomainEmail(option.login ?? '') && !includeDomainEmail) {
1919-
return;
1920-
}
1921-
19221920
if (isThread && !includeThreads) {
19231921
return;
19241922
}
@@ -2194,7 +2192,6 @@ function getFilteredOptions(
21942192
policyReportFieldOptions: string[] = [],
21952193
recentlyUsedPolicyReportFieldOptions: string[] = [],
21962194
includeInvoiceRooms = false,
2197-
includeDomainEmail = false,
21982195
) {
21992196
return getOptions(
22002197
{reports, personalDetails},
@@ -2222,7 +2219,6 @@ function getFilteredOptions(
22222219
policyReportFieldOptions,
22232220
recentlyUsedPolicyReportFieldOptions,
22242221
includeInvoiceRooms,
2225-
includeDomainEmail,
22262222
},
22272223
);
22282224
}

src/libs/ReportUtils.ts

+9
Original file line numberDiff line numberDiff line change
@@ -5383,6 +5383,8 @@ function shouldReportBeInOptionList({
53835383
excludeEmptyChats,
53845384
doesReportHaveViolations,
53855385
includeSelfDM = false,
5386+
login,
5387+
includeDomainEmail = false,
53865388
}: {
53875389
report: OnyxEntry<Report>;
53885390
currentReportId: string;
@@ -5392,6 +5394,8 @@ function shouldReportBeInOptionList({
53925394
excludeEmptyChats: boolean;
53935395
doesReportHaveViolations: boolean;
53945396
includeSelfDM?: boolean;
5397+
login?: string;
5398+
includeDomainEmail?: boolean;
53955399
}) {
53965400
const isInDefaultMode = !isInFocusMode;
53975401
// Exclude reports that have no data because there wouldn't be anything to show in the option item.
@@ -5495,6 +5499,11 @@ function shouldReportBeInOptionList({
54955499
if (isSelfDM(report)) {
54965500
return includeSelfDM;
54975501
}
5502+
5503+
if (Str.isDomainEmail(login ?? '') && !includeDomainEmail) {
5504+
return false;
5505+
}
5506+
54985507
const parentReportAction = ReportActionsUtils.getParentReportAction(report);
54995508

55005509
// Hide chat threads where the parent message is pending removal

0 commit comments

Comments
 (0)