diff --git a/native/profile/keyserver-selection-bottom-sheet.react.js b/native/profile/keyserver-selection-bottom-sheet.react.js --- a/native/profile/keyserver-selection-bottom-sheet.react.js +++ b/native/profile/keyserver-selection-bottom-sheet.react.js @@ -29,9 +29,6 @@ +keyserverInfo: KeyserverInfo, }; -// header + paddingTop + paddingBottom + marginBottom -const keyserverHeaderHeight = 84 + 16 + 16 + 24; - type Props = { +navigation: RootNavigationProp<'KeyserverSelectionBottomSheet'>, +route: NavigationRoute<'KeyserverSelectionBottomSheet'>, @@ -51,8 +48,7 @@ invariant(bottomSheetContext, 'bottomSheetContext should be set'); const { setContentHeight } = bottomSheetContext; - const removeKeyserverContainerRef = - React.useRef>(); + const containerRef = React.useRef>(); const bottomSheetRef = React.useRef(); const colors = useColors(); @@ -61,20 +57,18 @@ const insets = useSafeAreaInsets(); const onLayout = React.useCallback(() => { - removeKeyserverContainerRef.current?.measure( - (x, y, width, height, pageX, pageY) => { - if ( - height === null || - height === undefined || - pageY === null || - pageY === undefined - ) { - return; - } + containerRef.current?.measure((x, y, width, height, pageX, pageY) => { + if ( + height === null || + height === undefined || + pageY === null || + pageY === undefined + ) { + return; + } - setContentHeight(height + keyserverHeaderHeight + insets.bottom); - }, - ); + setContentHeight(height + insets.bottom); + }); }, [insets.bottom, setContentHeight]); const cloudIcon = React.useMemo( @@ -196,7 +190,7 @@ return ( - + @@ -212,9 +206,7 @@ {keyserverInfo.urlPrefix} - - {removeKeyserver} - + {removeKeyserver} );