Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unable to close bank account page #35130

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,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 @@ -1587,8 +1587,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
Loading