Fix channel quick actions bottom sheet size (#6322)

This commit is contained in:
Elias Nahum 2022-06-03 07:33:45 -04:00 committed by GitHub
parent 96797909ea
commit 18a94f2b33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -24,6 +24,8 @@ export const HEADER_SEARCH_BOTTOM_MARGIN = 10;
export const INDICATOR_BAR_HEIGHT = 38;
export const QUICK_OPTIONS_HEIGHT = 270;
export default {
BOTTOM_TAB_HEIGHT,
BOTTOM_TAB_ICON_SIZE,
@ -45,5 +47,6 @@ export default {
KEYBOARD_TRACKING_OFFSET,
HEADER_SEARCH_HEIGHT,
HEADER_SEARCH_BOTTOM_MARGIN,
QUICK_OPTIONS_HEIGHT,
};

View file

@ -11,6 +11,7 @@ import CustomStatusEmoji from '@components/custom_status/custom_status_emoji';
import NavigationHeader from '@components/navigation_header';
import RoundedHeaderContext from '@components/rounded_header_context';
import {General, Navigation, Screens} from '@constants';
import {QUICK_OPTIONS_HEIGHT} from '@constants/view';
import {useTheme} from '@context/theme';
import {useIsTablet} from '@hooks/device';
import {useDefaultHeaderHeight} from '@hooks/header';
@ -132,7 +133,7 @@ const ChannelHeader = ({
bottomSheet({
title: '',
renderContent,
snapPoints: ['32%', 10],
snapPoints: [QUICK_OPTIONS_HEIGHT, 10],
theme,
closeButtonId: 'close-channel-quick-actions',
});

View file

@ -7,6 +7,7 @@ import {View} from 'react-native';
import ChannelActions from '@components/channel_actions';
import InfoBox from '@components/channel_actions/info_box';
import LeaveChannelLabel from '@components/channel_actions/leave_channel_label';
import {QUICK_OPTIONS_HEIGHT} from '@constants/view';
import {useTheme} from '@context/theme';
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
@ -16,7 +17,7 @@ type Props = {
const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => ({
container: {
minHeight: 270,
minHeight: QUICK_OPTIONS_HEIGHT,
},
line: {
backgroundColor: changeOpacity(theme.centerChannelColor, 0.08),