@@ -11,6 +11,7 @@ import {withNavigationFocus} from '@react-navigation/compat';
11
11
import _ from 'underscore' ;
12
12
import lodashGet from 'lodash/get' ;
13
13
import { withOnyx } from 'react-native-onyx' ;
14
+ import lodashIntersection from 'lodash/intersection' ;
14
15
import styles , { getButtonBackgroundColorStyle , getIconFillColor } from '../../../styles/styles' ;
15
16
import themeColors from '../../../styles/themes/default' ;
16
17
import TextInputFocusable from '../../../components/TextInputFocusable' ;
@@ -41,7 +42,7 @@ import EmojiPickerMenu from './EmojiPickerMenu';
41
42
import withWindowDimensions , { windowDimensionsPropTypes } from '../../../components/withWindowDimensions' ;
42
43
import withDrawerState from '../../../components/withDrawerState' ;
43
44
import getButtonState from '../../../libs/getButtonState' ;
44
- import CONST from '../../../CONST' ;
45
+ import CONST , { EXPENSIFY_EMAILS } from '../../../CONST' ;
45
46
import canFocusInputOnScreenFocus from '../../../libs/canFocusInputOnScreenFocus' ;
46
47
import variables from '../../../styles/variables' ;
47
48
import withLocalize , { withLocalizePropTypes } from '../../../components/withLocalize' ;
@@ -441,13 +442,12 @@ class ReportActionCompose extends React.Component {
441
442
// eslint-disable-next-line no-unused-vars
442
443
const reportParticipants = lodashGet ( this . props . report , 'participants' , [ ] ) ;
443
444
const hasMultipleParticipants = reportParticipants . length > 1 ;
444
- const hasChronosParticipant = _ . contains ( reportParticipants , CONST . EMAIL . CHRONOS ) ;
445
+ const hasExpensifyEmails = lodashIntersection ( reportParticipants , EXPENSIFY_EMAILS ) . length > 0 ;
445
446
const hasConciergeParticipant = _ . contains ( reportParticipants , CONST . EMAIL . CONCIERGE ) ;
446
447
const reportRecipient = this . props . personalDetails [ reportParticipants [ 0 ] ] ;
447
448
const currentUserTimezone = lodashGet ( this . props . myPersonalDetails , 'timezone' , CONST . DEFAULT_TIME_ZONE ) ;
448
449
const reportRecipientTimezone = lodashGet ( reportRecipient , 'timezone' , CONST . DEFAULT_TIME_ZONE ) ;
449
- const shouldShowReportRecipientLocalTime = ! hasConciergeParticipant
450
- && ! hasChronosParticipant
450
+ const shouldShowReportRecipientLocalTime = ! hasExpensifyEmails
451
451
&& ! hasMultipleParticipants
452
452
&& reportRecipient
453
453
&& reportRecipientTimezone
0 commit comments