Skip to content

Commit

Permalink
Merge pull request #37147 from suneox/33546-update-fix-by-use-case
Browse files Browse the repository at this point in the history
33546 update fix by use case
  • Loading branch information
techievivek authored Feb 29, 2024
2 parents 3e74ddf + 2e84755 commit a416ca2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/ScreenWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ type ScreenWrapperProps = {
/** Whether to avoid scroll on virtual viewport */
shouldAvoidScrollOnVirtualViewport?: boolean;

/** Whether to use cached virtual viewport height */
shouldUseCachedViewportHeight?: boolean;

/**
* The navigation prop is passed by the navigator. It is used to trigger the onEntryTransitionEnd callback
* when the screen transition ends.
Expand Down Expand Up @@ -115,6 +118,7 @@ function ScreenWrapper(
navigation: navigationProp,
shouldAvoidScrollOnVirtualViewport = true,
shouldShowOfflineIndicatorInWideScreen = false,
shouldUseCachedViewportHeight = false,
}: ScreenWrapperProps,
ref: ForwardedRef<View>,
) {
Expand All @@ -127,7 +131,7 @@ function ScreenWrapper(
*/
const navigationFallback = useNavigation<StackNavigationProp<RootStackParamList>>();
const navigation = navigationProp ?? navigationFallback;
const {windowHeight, isSmallScreenWidth} = useWindowDimensions(shouldEnableMaxHeight);
const {windowHeight, isSmallScreenWidth} = useWindowDimensions(shouldUseCachedViewportHeight);
const {initialHeight} = useInitialDimensions();
const styles = useThemeStyles();
const keyboardState = useKeyboardState();
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceInvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ function WorkspaceInvitePage({
return (
<ScreenWrapper
shouldEnableMaxHeight
shouldUseCachedViewportHeight
testID={WorkspaceInvitePage.displayName}
>
<FullPageNotFoundView
Expand Down

0 comments on commit a416ca2

Please sign in to comment.