File tree 2 files changed +4
-18
lines changed
2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -5387,8 +5387,6 @@ function shouldReportBeInOptionList({
5387
5387
report ?. reportName === undefined ||
5388
5388
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
5389
5389
report ?. isHidden ||
5390
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
5391
- participantAccountIDs . includes ( CONST . ACCOUNT_ID . NOTIFICATIONS ) ||
5392
5390
( participantAccountIDs . length === 0 &&
5393
5391
! isChatThread ( report ) &&
5394
5392
! isPublicRoom ( report ) &&
@@ -5404,6 +5402,10 @@ function shouldReportBeInOptionList({
5404
5402
return false ;
5405
5403
}
5406
5404
5405
+ if ( participantAccountIDs . includes ( CONST . ACCOUNT_ID . NOTIFICATIONS ) && ( ! currentUserAccountID || ! AccountUtils . isAccountIDOddNumber ( currentUserAccountID ) ) ) {
5406
+ return false ;
5407
+ }
5408
+
5407
5409
if ( ! canAccessReport ( report , policies , betas ) ) {
5408
5410
return false ;
5409
5411
}
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import type PriorityMode from '@src/types/onyx/PriorityMode';
11
11
import type Report from '@src/types/onyx/Report' ;
12
12
import type ReportAction from '@src/types/onyx/ReportAction' ;
13
13
import type DeepValueOf from '@src/types/utils/DeepValueOf' ;
14
- import AccountUtils from './AccountUtils' ;
15
14
import * as CollectionUtils from './CollectionUtils' ;
16
15
import { hasValidDraftComment } from './DraftCommentUtils' ;
17
16
import localeCompare from './LocaleCompare' ;
@@ -43,14 +42,6 @@ Onyx.connect({
43
42
} ,
44
43
} ) ;
45
44
46
- let currentUserAccountID : number | undefined ;
47
- Onyx . connect ( {
48
- key : ONYXKEYS . SESSION ,
49
- callback : ( value ) => {
50
- currentUserAccountID = value ?. accountID ;
51
- } ,
52
- } ) ;
53
-
54
45
function compareStringDates ( a : string , b : string ) : 0 | 1 | - 1 {
55
46
if ( a < b ) {
56
47
return - 1 ;
@@ -115,13 +106,6 @@ function getOrderedReportIDs(
115
106
return false ;
116
107
}
117
108
118
- const participantAccountIDs = Object . keys ( report ?. participants ?? { } ) . map ( Number ) ;
119
- const isOnboardedByPersona = currentUserAccountID && AccountUtils . isAccountIDOddNumber ( currentUserAccountID ) && participantAccountIDs . includes ( CONST . ACCOUNT_ID . NOTIFICATIONS ) ;
120
-
121
- if ( isOnboardedByPersona && isSystemChat && ! isInFocusMode ) {
122
- return true ;
123
- }
124
-
125
109
return ReportUtils . shouldReportBeInOptionList ( {
126
110
report,
127
111
currentReportId : currentReportId ?? '-1' ,
You can’t perform that action at this time.
0 commit comments