diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index a0673a2e0cec..7e8966ed0d3f 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -831,19 +831,6 @@ function isConciergeChatReport(report: OnyxEntry): boolean { return report?.participantAccountIDs?.length === 1 && Number(report.participantAccountIDs?.[0]) === CONST.ACCOUNT_ID.CONCIERGE && !isChatThread(report); } -/** - * Only returns true if this is a DM report with Concierge, opened from OldDot - */ -function isOldDotConciergeChat(initialURL: string, report: OnyxEntry): boolean { - const params = new URLSearchParams(initialURL); - const exitToRoute = params.get('exitTo') ?? ''; - const {reportID} = parseReportRouteParams(exitToRoute); - if (reportID !== report?.reportID) { - return false; - } - return report?.participantAccountIDs?.length === 1 && Number(report.participantAccountIDs?.[0]) === CONST.ACCOUNT_ID.CONCIERGE; -} - /** * Returns true if report is still being processed */ @@ -4445,7 +4432,6 @@ export { isPublicRoom, isPublicAnnounceRoom, isConciergeChatReport, - isOldDotConciergeChat, isProcessingReport, isCurrentUserTheOnlyParticipant, hasAutomatedExpensifyAccountIDs, diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index 77043c5142ec..b35d9240f3f7 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -2,7 +2,7 @@ import {useIsFocused} from '@react-navigation/native'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; -import {Linking, View} from 'react-native'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; import Banner from '@components/Banner'; @@ -194,7 +194,6 @@ function ReportScreen({ const policy = policies[`${ONYXKEYS.COLLECTION.POLICY}${report.policyID}`] || {}; const isTopMostReportId = currentReportID === getReportID(route); const didSubscribeToReportLeavingEvents = useRef(false); - const isOldDotConciergeRef = useRef(false); useEffect(() => { if (!report || !report.reportID || shouldHideReport) { @@ -351,9 +350,6 @@ function ReportScreen({ Timing.end(CONST.TIMING.CHAT_RENDER); Performance.markEnd(CONST.TIMING.CHAT_RENDER); - Linking.getInitialURL().then((url) => { - isOldDotConciergeRef.current = ReportUtils.isOldDotConciergeChat(url, report); - }); fetchReportIfNeeded(); ComposerActions.setShouldShowComposeInput(true); return () => {