@@ -29,13 +29,13 @@ import ControlSelection from '@libs/ControlSelection';
2929import { canUseTouchScreen } from '@libs/DeviceCapabilities' ;
3030import getButtonState from '@libs/getButtonState' ;
3131import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID' ;
32+ import getReportRouteForCurrentContext from '@libs/Navigation/helpers/getReportRouteForCurrentContext' ;
3233import Navigation from '@libs/Navigation/Navigation' ;
3334import Parser from '@libs/Parser' ;
3435import { getOriginalMessage } from '@libs/ReportActionsUtils' ;
3536import { isCanceledTaskReport , isOpenTaskReport , isReportManager } from '@libs/ReportUtils' ;
3637import CONST from '@src/CONST' ;
3738import ONYXKEYS from '@src/ONYXKEYS' ;
38- import ROUTES from '@src/ROUTES' ;
3939import type { Report , ReportAction } from '@src/types/onyx' ;
4040import { isEmptyObject } from '@src/types/utils/EmptyObject' ;
4141
@@ -121,7 +121,7 @@ function TaskPreview({action, chatReportID, currentUserPersonalDetails, isHovere
121121 return (
122122 < View style = { [ styles . chatItemMessage , ! hasAssignee && styles . mv1 ] } >
123123 < PressableWithoutFeedback
124- onPress = { ( ) => Navigation . navigate ( ROUTES . REPORT_WITH_ID . getRoute ( taskReportID , undefined , undefined , Navigation . getActiveRoute ( ) ) ) }
124+ onPress = { ( ) => Navigation . navigate ( getReportRouteForCurrentContext ( { reportID : taskReportID } ) ) }
125125 onPressIn = { ( ) => canUseTouchScreen ( ) && ControlSelection . block ( ) }
126126 onPressOut = { ( ) => ControlSelection . unblock ( ) }
127127 onLongPress = { ( event ) =>
0 commit comments