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

[CP Staging] Fix navigating to new chat page via keyboard shortcut #27719

Merged
merged 4 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions src/libs/Navigation/AppNavigator/AuthScreens.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ class AuthScreens extends React.Component {
chatShortcutConfig.shortcutKey,
() => {
Modal.close(() => {
if (Navigation.isActiveRoute(ROUTES.NEW_CHAT)) {
if (Navigation.isActiveRoute(ROUTES.NEW)) {
return;
}
Navigation.navigate(ROUTES.NEW_CHAT);
Navigation.navigate(ROUTES.NEW);
});
},
chatShortcutConfig.descriptionKey,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/NewChatSelectorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import OnyxTabNavigator, {TopTab} from '../libs/Navigation/OnyxTabNavigator';
import TabSelector from '../components/TabSelector/TabSelector';
import Navigation from '../libs/Navigation/Navigation';
import Permissions from '../libs/Permissions';

Check failure on line 5 in src/pages/NewChatSelectorPage.js

View workflow job for this annotation

GitHub Actions / lint

'Permissions' is defined but never used
import NewChatPage from './NewChatPage';
import WorkspaceNewRoomPage from './workspace/WorkspaceNewRoomPage';
import CONST from '../CONST';
Expand Down Expand Up @@ -35,7 +35,7 @@
title={props.translate('sidebarScreen.fabNewChat')}
onBackButtonPress={Navigation.dismissModal}
/>
{Permissions.canUsePolicyRooms(props.betas) ? (
{true ? (

Check warning on line 38 in src/pages/NewChatSelectorPage.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected constant condition
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh there was discussion that we're now removing policy room beta?

<OnyxTabNavigator
id={CONST.TAB.NEW_CHAT_TAB_ID}
tabBar={({state, navigation, position}) => (
Expand Down
Loading