Skip to content

fix: Website closes when using device´s back button after requesting to join WS #58676

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

Merged
merged 7 commits into from
Mar 21, 2025
Merged
Show file tree
Hide file tree
Changes from 4 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
8 changes: 6 additions & 2 deletions src/libs/navigateAfterJoinRequest/index.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ import ROUTES from '@src/ROUTES';
const navigateAfterJoinRequest = () => {
Navigation.goBack(undefined, {shouldPopToTop: true});
if (getIsSmallScreenWidth()) {
Navigation.navigate(ROUTES.SETTINGS);
Navigation.setNavigationActionToMicrotaskQueue(() => {
Navigation.navigate(ROUTES.SETTINGS);
});
}
Navigation.navigate(ROUTES.SETTINGS_WORKSPACES.route);
Navigation.setNavigationActionToMicrotaskQueue(() => {
Navigation.navigate(ROUTES.SETTINGS_WORKSPACES.route);
});
};
export default navigateAfterJoinRequest;
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import CardAuthenticationModal from '@pages/settings/Subscription/CardAuthentica
import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper';
import withPolicy from '@pages/workspace/withPolicy';
import type {WithPolicyOnyxProps} from '@pages/workspace/withPolicy';
import * as MemberActions from '@userActions/Policy/Member';
import {clearWorkspaceOwnerChangeFlow} from '@userActions/Policy/Member';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
Expand Down Expand Up @@ -69,7 +69,7 @@ function WorkspaceOwnerChangeWrapperPage({route, policy}: WorkspaceOwnerChangeWr
<HeaderWithBackButton
title={translate('workspace.changeOwner.changeOwnerPageTitle')}
onBackButtonPress={() => {
MemberActions.clearWorkspaceOwnerChangeFlow(policyID);
clearWorkspaceOwnerChangeFlow(policyID);
Navigation.goBack();
Navigation.navigate(ROUTES.WORKSPACE_MEMBER_DETAILS.getRoute(policyID, accountID));
}}
Expand Down
Loading