diff --git a/src/libs/Navigation/OnyxTabNavigator.tsx b/src/libs/Navigation/OnyxTabNavigator.tsx index 20ed35077893f..0ab4a5b54123e 100644 --- a/src/libs/Navigation/OnyxTabNavigator.tsx +++ b/src/libs/Navigation/OnyxTabNavigator.tsx @@ -46,9 +46,6 @@ type OnyxTabNavigatorProps = ChildrenProps & { /** Whether to show the label when the tab is inactive */ shouldShowLabelWhenInactive?: boolean; - /** Disable swipe between tabs */ - disableSwipe?: boolean; - /** Determines whether the product training tooltip should be displayed to the user. */ shouldShowProductTrainingTooltip?: boolean; @@ -102,7 +99,6 @@ function OnyxTabNavigator({ onTabSelected = () => {}, screenListeners, shouldShowLabelWhenInactive = true, - disableSwipe = false, shouldShowProductTrainingTooltip, renderProductTrainingTooltip, lazyLoadEnabled = false, @@ -193,7 +189,7 @@ function OnyxTabNavigator({ }} screenOptions={{ ...defaultScreenOptions, - swipeEnabled: !disableSwipe, + swipeEnabled: false, lazy: lazyLoadEnabled, lazyPlaceholder: LazyPlaceholder, }} diff --git a/src/pages/NewChatSelectorPage.tsx b/src/pages/NewChatSelectorPage.tsx index fd60849af8483..a14847a912f99 100755 --- a/src/pages/NewChatSelectorPage.tsx +++ b/src/pages/NewChatSelectorPage.tsx @@ -5,14 +5,11 @@ import type {AnimatedTextInputRef} from '@components/RNTextInput'; import ScreenWrapper from '@components/ScreenWrapper'; import TabSelector from '@components/TabSelector/TabSelector'; import useLocalize from '@hooks/useLocalize'; -import useOnyx from '@hooks/useOnyx'; -import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useThemeStyles from '@hooks/useThemeStyles'; import {setNewRoomFormLoading} from '@libs/actions/Report'; import Navigation from '@libs/Navigation/Navigation'; import OnyxTabNavigator, {TabScreenWithFocusTrapWrapper, TopTab} from '@libs/Navigation/OnyxTabNavigator'; import CONST from '@src/CONST'; -import ONYXKEYS from '@src/ONYXKEYS'; import NewChatPage from './NewChatPage'; import WorkspaceNewRoomPage from './workspace/WorkspaceNewRoomPage'; @@ -23,8 +20,6 @@ function NewChatSelectorPage() { const [headerWithBackBtnContainerElement, setHeaderWithBackButtonContainerElement] = useState(null); const [tabBarContainerElement, setTabBarContainerElement] = useState(null); const [activeTabContainerElement, setActiveTabContainerElement] = useState(null); - const [formState] = useOnyx(ONYXKEYS.FORMS.NEW_ROOM_FORM, {canBeMissing: true}); - const {shouldUseNarrowLayout} = useResponsiveLayout(); const chatPageInputRef = useRef(null); const roomPageInputRef = useRef(null); @@ -84,7 +79,6 @@ function NewChatSelectorPage() { tabBar={TabSelector} onTabBarFocusTrapContainerElementChanged={setTabBarContainerElement} onActiveTabFocusTrapContainerElementChanged={onTabFocusTrapContainerElementChanged} - disableSwipe={!!formState?.isLoading && shouldUseNarrowLayout} onTabSelect={onTabSelectFocusHandler} > diff --git a/src/pages/iou/request/IOURequestStartPage.tsx b/src/pages/iou/request/IOURequestStartPage.tsx index 17592b879fc94..a5ef20ff93f46 100644 --- a/src/pages/iou/request/IOURequestStartPage.tsx +++ b/src/pages/iou/request/IOURequestStartPage.tsx @@ -18,7 +18,6 @@ import usePolicy from '@hooks/usePolicy'; import usePrevious from '@hooks/usePrevious'; import useThemeStyles from '@hooks/useThemeStyles'; import {dismissProductTraining} from '@libs/actions/Welcome'; -import {isMobile} from '@libs/Browser'; import {canUseTouchScreen} from '@libs/DeviceCapabilities'; import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID'; import getPlatform from '@libs/getPlatform'; @@ -280,8 +279,6 @@ function IOURequestStartPage({ shouldShowProductTrainingTooltip={shouldShowProductTrainingTooltip} renderProductTrainingTooltip={renderProductTrainingTooltip} lazyLoadEnabled - // We're disabling swipe on mWeb fo the Per Diem tab because the keyboard will hang on the other tab after switching - disableSwipe={(isMultiScanEnabled && selectedTab === CONST.TAB_REQUEST.SCAN) || (selectedTab === CONST.TAB_REQUEST.PER_DIEM && isMobile())} > {() => (