Skip to content

Commit f302e6f

Browse files
authored
Merge pull request #76343 from mdneyazahmad/fix/74735-navigation-transition
fix: broken screen animation during navigation transition
2 parents 675994d + 9057baa commit f302e6f

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

src/libs/Navigation/OnyxTabNavigator.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ type OnyxTabNavigatorProps = ChildrenProps & {
4646
/** Whether to show the label when the tab is inactive */
4747
shouldShowLabelWhenInactive?: boolean;
4848

49-
/** Disable swipe between tabs */
50-
disableSwipe?: boolean;
51-
5249
/** Determines whether the product training tooltip should be displayed to the user. */
5350
shouldShowProductTrainingTooltip?: boolean;
5451

@@ -102,7 +99,6 @@ function OnyxTabNavigator({
10299
onTabSelected = () => {},
103100
screenListeners,
104101
shouldShowLabelWhenInactive = true,
105-
disableSwipe = false,
106102
shouldShowProductTrainingTooltip,
107103
renderProductTrainingTooltip,
108104
lazyLoadEnabled = false,
@@ -193,7 +189,7 @@ function OnyxTabNavigator({
193189
}}
194190
screenOptions={{
195191
...defaultScreenOptions,
196-
swipeEnabled: !disableSwipe,
192+
swipeEnabled: false,
197193
lazy: lazyLoadEnabled,
198194
lazyPlaceholder: LazyPlaceholder,
199195
}}

src/pages/NewChatSelectorPage.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ import type {AnimatedTextInputRef} from '@components/RNTextInput';
55
import ScreenWrapper from '@components/ScreenWrapper';
66
import TabSelector from '@components/TabSelector/TabSelector';
77
import useLocalize from '@hooks/useLocalize';
8-
import useOnyx from '@hooks/useOnyx';
9-
import useResponsiveLayout from '@hooks/useResponsiveLayout';
108
import useThemeStyles from '@hooks/useThemeStyles';
119
import {setNewRoomFormLoading} from '@libs/actions/Report';
1210
import Navigation from '@libs/Navigation/Navigation';
1311
import OnyxTabNavigator, {TabScreenWithFocusTrapWrapper, TopTab} from '@libs/Navigation/OnyxTabNavigator';
1412
import CONST from '@src/CONST';
15-
import ONYXKEYS from '@src/ONYXKEYS';
1613
import NewChatPage from './NewChatPage';
1714
import WorkspaceNewRoomPage from './workspace/WorkspaceNewRoomPage';
1815

@@ -23,8 +20,6 @@ function NewChatSelectorPage() {
2320
const [headerWithBackBtnContainerElement, setHeaderWithBackButtonContainerElement] = useState<HTMLElement | null>(null);
2421
const [tabBarContainerElement, setTabBarContainerElement] = useState<HTMLElement | null>(null);
2522
const [activeTabContainerElement, setActiveTabContainerElement] = useState<HTMLElement | null>(null);
26-
const [formState] = useOnyx(ONYXKEYS.FORMS.NEW_ROOM_FORM, {canBeMissing: true});
27-
const {shouldUseNarrowLayout} = useResponsiveLayout();
2823
const chatPageInputRef = useRef<AnimatedTextInputRef | null>(null);
2924
const roomPageInputRef = useRef<AnimatedTextInputRef | null>(null);
3025

@@ -84,7 +79,6 @@ function NewChatSelectorPage() {
8479
tabBar={TabSelector}
8580
onTabBarFocusTrapContainerElementChanged={setTabBarContainerElement}
8681
onActiveTabFocusTrapContainerElementChanged={onTabFocusTrapContainerElementChanged}
87-
disableSwipe={!!formState?.isLoading && shouldUseNarrowLayout}
8882
onTabSelect={onTabSelectFocusHandler}
8983
>
9084
<TopTab.Screen name={CONST.TAB.NEW_CHAT}>

src/pages/iou/request/IOURequestStartPage.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import usePolicy from '@hooks/usePolicy';
1818
import usePrevious from '@hooks/usePrevious';
1919
import useThemeStyles from '@hooks/useThemeStyles';
2020
import {dismissProductTraining} from '@libs/actions/Welcome';
21-
import {isMobile} from '@libs/Browser';
2221
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
2322
import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID';
2423
import getPlatform from '@libs/getPlatform';
@@ -283,8 +282,6 @@ function IOURequestStartPage({
283282
shouldShowProductTrainingTooltip={shouldShowProductTrainingTooltip}
284283
renderProductTrainingTooltip={renderProductTrainingTooltip}
285284
lazyLoadEnabled
286-
// We're disabling swipe on mWeb fo the Per Diem tab because the keyboard will hang on the other tab after switching
287-
disableSwipe={(isMultiScanEnabled && selectedTab === CONST.TAB_REQUEST.SCAN) || (selectedTab === CONST.TAB_REQUEST.PER_DIEM && isMobile())}
288285
>
289286
<TopTab.Screen name={CONST.TAB_REQUEST.MANUAL}>
290287
{() => (

0 commit comments

Comments
 (0)