Skip to content

Commit

Permalink
Merge pull request #35130 from bernhardoj/fix/34456-unable-to-close-b…
Browse files Browse the repository at this point in the history
…a-page

Fix unable to close bank account page
  • Loading branch information
stitesExpensify authored Jan 29, 2024
2 parents 2c28a47 + 75c0dca commit 93011f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ function updateWriteCapabilityAndNavigate(report: Report, newValue: WriteCapabil
*
* @param ignoreConciergeReportID - Flag to ignore conciergeChatReportID during navigation. The default behavior is to not ignore.
*/
function navigateToConciergeChat(ignoreConciergeReportID = false) {
function navigateToConciergeChat(ignoreConciergeReportID = false, shouldDismissModal = false) {
// If conciergeChatReportID contains a concierge report ID, we navigate to the concierge chat using the stored report ID.
// Otherwise, we would find the concierge chat and navigate to it.
// Now, when user performs sign-out and a sign-in again, conciergeChatReportID may contain a stale value.
Expand All @@ -1536,8 +1536,10 @@ function navigateToConciergeChat(ignoreConciergeReportID = false) {
// we need to ensure that the server data has been successfully pulled
Welcome.serverDataIsReadyPromise().then(() => {
// If we don't have a chat with Concierge then create it
navigateToAndOpenReport([CONST.EMAIL.CONCIERGE], false);
navigateToAndOpenReport([CONST.EMAIL.CONCIERGE], shouldDismissModal);
});
} else if (shouldDismissModal) {
Navigation.dismissModal(conciergeChatReportID);
} else {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeChatReportID));
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ReimbursementAccount/ValidationStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function ValidationStep({reimbursementAccount, translate, onBackButtonPress, acc
<Text>{translate('validationStep.letsChatText')}</Text>
<Button
text={translate('validationStep.letsChatCTA')}
onPress={Report.navigateToConciergeChat}
onPress={() => Report.navigateToConciergeChat(false, true)}
icon={Expensicons.ChatBubble}
style={[styles.mt4]}
iconStyles={[styles.buttonCTAIcon]}
Expand Down

0 comments on commit 93011f4

Please sign in to comment.