From a05744b369b673a82d586031a76d6f344cd1937c Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 2 Jul 2024 11:13:14 +0800 Subject: [PATCH] fix switching ws still shows other ws chat --- src/libs/Navigation/AppNavigator/AuthScreens.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index 4bf7e208590a..ba296522ccef 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -4,7 +4,6 @@ import type {OnyxEntry} from 'react-native-onyx'; import Onyx, {withOnyx} from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; import OptionsListContextProvider from '@components/OptionListContextProvider'; -import useLastAccessedReportID from '@hooks/useLastAccessedReportID'; import useOnboardingLayout from '@hooks/useOnboardingLayout'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; @@ -83,7 +82,7 @@ function shouldOpenOnAdminRoom() { return url ? new URL(url).searchParams.get('openOnAdminRoom') === 'true' : false; } -function getCentralPaneScreenInitialParams(screenName: CentralPaneName, lastAccessedReportID?: string): Partial> { +function getCentralPaneScreenInitialParams(screenName: CentralPaneName): Partial> { if (screenName === SCREENS.SEARCH.CENTRAL_PANE) { return {sortBy: CONST.SEARCH.TABLE_COLUMNS.DATE, sortOrder: CONST.SEARCH.SORT_ORDER.DESC}; } @@ -91,7 +90,6 @@ function getCentralPaneScreenInitialParams(screenName: CentralPaneName, lastAcce if (screenName === SCREENS.REPORT) { return { openOnAdminRoom: shouldOpenOnAdminRoom() ? true : undefined, - reportID: lastAccessedReportID, }; } @@ -198,7 +196,6 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie const StyleUtils = useStyleUtils(); const {isSmallScreenWidth} = useWindowDimensions(); const {shouldUseNarrowLayout} = useOnboardingLayout(); - const lastAccessedReportID = useLastAccessedReportID(shouldOpenOnAdminRoom()); const screenOptions = getRootNavigatorScreenOptions(isSmallScreenWidth, styles, StyleUtils); const onboardingModalScreenOptions = useMemo(() => screenOptions.onboardingModalNavigator(shouldUseNarrowLayout), [screenOptions, shouldUseNarrowLayout]); const onboardingScreenOptions = useMemo( @@ -474,7 +471,7 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie