@@ -14,12 +14,11 @@ import {PUSH_PROXY_STATUS_NOT_AVAILABLE, PUSH_PROXY_STATUS_VERIFIED} from '@cons
1414import { HOME_PADDING } from '@constants/view' ;
1515import { useServerDisplayName , useServerUrl } from '@context/server' ;
1616import { useTheme } from '@context/theme' ;
17- import { useIsTablet } from '@hooks/device ' ;
17+ import { usePreventDoubleTap } from '@hooks/utils ' ;
1818import { bottomSheet } from '@screens/navigation' ;
1919import { bottomSheetSnapPoint } from '@utils/helpers' ;
2020import { alertPushProxyError , alertPushProxyUnknown } from '@utils/push_proxy' ;
2121import { alertServerLogout } from '@utils/server' ;
22- import { preventDoubleTap } from '@utils/tap' ;
2322import { changeOpacity , makeStyleSheetFromTheme } from '@utils/theme' ;
2423import { typography } from '@utils/typography' ;
2524
@@ -112,7 +111,6 @@ const ChannelListHeader = ({
112111 pushProxyStatus,
113112} : Props ) => {
114113 const theme = useTheme ( ) ;
115- const isTablet = useIsTablet ( ) ;
116114 const intl = useIntl ( ) ;
117115 const serverDisplayName = useServerDisplayName ( ) ;
118116 const marginLeft = useSharedValue ( iconPad ? 50 : 0 ) ;
@@ -125,7 +123,7 @@ const ChannelListHeader = ({
125123 marginLeft . value = iconPad ? 50 : 0 ;
126124 } , [ iconPad ] ) ;
127125
128- const onPress = useCallback ( preventDoubleTap ( ( ) => {
126+ const onPress = usePreventDoubleTap ( useCallback ( ( ) => {
129127 const renderContent = ( ) => {
130128 return (
131129 < PlusMenu
@@ -160,7 +158,7 @@ const ChannelListHeader = ({
160158 theme,
161159 title : intl . formatMessage ( { id : 'home.header.plus_menu' , defaultMessage : 'Options' } ) ,
162160 } ) ;
163- } ) , [ intl , isTablet , theme ] ) ;
161+ } , [ intl , theme , canCreateChannels , canInvitePeople , canJoinChannels ] ) ) ;
164162
165163 const onPushAlertPress = useCallback ( ( ) => {
166164 if ( pushProxyStatus === PUSH_PROXY_STATUS_NOT_AVAILABLE ) {
0 commit comments