Skip to content

Commit

Permalink
navigate to Concierge chat from deep link
Browse files Browse the repository at this point in the history
  • Loading branch information
marcochavezf committed Mar 9, 2023
1 parent f970b56 commit d62dfdb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1643,6 +1643,7 @@ export {
getDisplayNamesWithTooltips,
getReportName,
getReportIDFromLink,
getRouteFromLink,
navigateToDetailsPage,
generateReportID,
hasReportNameError,
Expand Down
13 changes: 8 additions & 5 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -1370,13 +1370,16 @@ function toggleEmojiReaction(reportID, reportAction, emoji, paramSkinTone = pref
* @param {String|null} url
*/
function openReportFromDeepLink(url) {
const reportID = ReportUtils.getReportIDFromLink(url);
if (!reportID) {
return;
}
InteractionManager.runAfterInteractions(() => {
Navigation.isReportScreenReady().then(() => {
Navigation.navigate(ROUTES.getReportRoute(reportID));
const route = ReportUtils.getRouteFromLink(url);
const reportID = ReportUtils.getReportIDFromLink(url);
if (reportID) {
Navigation.navigate(ROUTES.getReportRoute(reportID));
}
if (route === ROUTES.CONCIERGE) {
navigateToConciergeChat();
}
});
});
}
Expand Down

0 comments on commit d62dfdb

Please sign in to comment.