Skip to content

Commit

Permalink
Merge pull request #31701 from WikusKriek/23068-wrong-report-when-clo…
Browse files Browse the repository at this point in the history
…sing-attachment-modal

Revert 25521
  • Loading branch information
jasperhuangg authored Nov 29, 2023
2 parents de1dd81 + 60c0650 commit 0aca61b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,6 @@ const CONST = {
TIME_STARTS_01: /^01:\d{2} [AP]M$/,
TIME_FORMAT: /^\d{2}:\d{2} [AP]M$/,
DATE_TIME_FORMAT: /^\d{2}-\d{2} \d{2}:\d{2} [AP]M$/,
ATTACHMENT_ROUTE: /\/r\/(\d*)\/attachment/,
ILLEGAL_FILENAME_CHARACTERS: /\/|<|>|\*|"|:|\?|\\|\|/g,

ENCODE_PERCENT_CHARACTER: /%(25)+/g,
Expand Down
7 changes: 0 additions & 7 deletions src/libs/Navigation/AppNavigator/ReportScreenIDSetter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import {useEffect} from 'react';
import {withOnyx} from 'react-native-onyx';
import usePermissions from '@hooks/usePermissions';
import Navigation from '@libs/Navigation/Navigation';
import * as ReportUtils from '@libs/ReportUtils';
import reportPropTypes from '@pages/reportPropTypes';
import * as App from '@userActions/App';
Expand Down Expand Up @@ -61,12 +60,6 @@ const defaultProps = {
* @returns {Number}
*/
const getLastAccessedReportID = (reports, ignoreDefaultRooms, policies, isFirstTimeNewExpensifyUser, openOnAdminRoom) => {
// If deeplink url contains reportID params, we should show the report that has this reportID.
const currentRoute = Navigation.getActiveRoute();
const {reportID} = ReportUtils.parseReportRouteParams(currentRoute);
if (reportID) {
return reportID;
}
const lastReport = ReportUtils.findLastAccessedReport(reports, ignoreDefaultRooms, policies, isFirstTimeNewExpensifyUser, openOnAdminRoom);
return lodashGet(lastReport, 'reportID');
};
Expand Down

0 comments on commit 0aca61b

Please sign in to comment.