From 1207b0e0cdc7ae129beaefcad05917acf05c14fb Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Wed, 5 Feb 2025 17:50:04 +0800 Subject: [PATCH] Fix plus menu on home screen (#8560) * fix plus menu on home screen * fix snapshot tests * Update index.test.tsx.snap * Update index.test.tsx.snap --- .../home/channel_list/categories_list/header/header.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/screens/home/channel_list/categories_list/header/header.tsx b/app/screens/home/channel_list/categories_list/header/header.tsx index 94cacb891..38a9b6963 100644 --- a/app/screens/home/channel_list/categories_list/header/header.tsx +++ b/app/screens/home/channel_list/categories_list/header/header.tsx @@ -14,12 +14,11 @@ import {PUSH_PROXY_STATUS_NOT_AVAILABLE, PUSH_PROXY_STATUS_VERIFIED} from '@cons import {HOME_PADDING} from '@constants/view'; import {useServerDisplayName, useServerUrl} from '@context/server'; import {useTheme} from '@context/theme'; -import {useIsTablet} from '@hooks/device'; +import {usePreventDoubleTap} from '@hooks/utils'; import {bottomSheet} from '@screens/navigation'; import {bottomSheetSnapPoint} from '@utils/helpers'; import {alertPushProxyError, alertPushProxyUnknown} from '@utils/push_proxy'; import {alertServerLogout} from '@utils/server'; -import {preventDoubleTap} from '@utils/tap'; import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme'; import {typography} from '@utils/typography'; @@ -112,7 +111,6 @@ const ChannelListHeader = ({ pushProxyStatus, }: Props) => { const theme = useTheme(); - const isTablet = useIsTablet(); const intl = useIntl(); const serverDisplayName = useServerDisplayName(); const marginLeft = useSharedValue(iconPad ? 50 : 0); @@ -125,7 +123,7 @@ const ChannelListHeader = ({ marginLeft.value = iconPad ? 50 : 0; }, [iconPad]); - const onPress = useCallback(preventDoubleTap(() => { + const onPress = usePreventDoubleTap(useCallback(() => { const renderContent = () => { return ( { if (pushProxyStatus === PUSH_PROXY_STATUS_NOT_AVAILABLE) {