diff --git a/src/components/Filter.tsx b/src/components/Filter.tsx index f9c57fef..92fa9c40 100644 --- a/src/components/Filter.tsx +++ b/src/components/Filter.tsx @@ -2,8 +2,7 @@ import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import { Fragment } from 'react' import { Trans, useTranslation } from 'react-i18next' -import { View, ViewStyle } from 'react-native' -import { TouchableNativeFeedback } from 'react-native-gesture-handler' +import { Pressable, View, ViewStyle } from 'react-native' import Icon from './Icon' import CustomText from './Text' @@ -19,7 +18,7 @@ export const Filter: React.FC = ({ onPress, filter, button, style }) => { const { colors } = useTheme() return ( - + = ({ onPress, filter, button, style }) => { /> )} - + ) } diff --git a/src/components/SwipeToActions.tsx b/src/components/SwipeToActions.tsx index 1b391de3..74f6e01f 100644 --- a/src/components/SwipeToActions.tsx +++ b/src/components/SwipeToActions.tsx @@ -1,5 +1,5 @@ import { StyleConstants } from '@utils/styles/constants' -import { ColorValue, TouchableNativeFeedback, View } from 'react-native' +import { ColorValue, Pressable, View } from 'react-native' import { SwipeListView } from 'react-native-swipe-list-view' import haptics from './haptics' import Icon, { IconName } from './Icon' @@ -25,7 +25,7 @@ export const SwipeToActions = ({ renderHiddenItem={({ item }) => ( {actions.map((action, index) => ( - { haptics(action.haptic || 'Light') @@ -43,7 +43,7 @@ export const SwipeToActions = ({ > - + ))} )} diff --git a/src/screens/Tabs/index.tsx b/src/screens/Tabs/index.tsx index 2f1505aa..4d15445d 100644 --- a/src/screens/Tabs/index.tsx +++ b/src/screens/Tabs/index.tsx @@ -2,11 +2,11 @@ import GracefullyImage from '@components/GracefullyImage' import haptics from '@components/haptics' import Icon from '@components/Icon' import { createBottomTabNavigator } from '@react-navigation/bottom-tabs' -import { RootStackScreenProps, ScreenTabsStackParamList } from '@utils/navigation/navigators' +import { ScreenTabsStackParamList } from '@utils/navigation/navigators' import { getGlobalStorage, useAccountStorage, useGlobalStorage } from '@utils/storage/actions' import { useTheme } from '@utils/styles/ThemeManager' import React from 'react' -import { Platform } from 'react-native' +import { Platform, View } from 'react-native' import TabLocal from './Local' import TabMe from './Me' import TabNotifications from './Notifications' @@ -14,7 +14,7 @@ import TabPublic from './Public' const Tab = createBottomTabNavigator() -const ScreenTabs = ({ navigation }: RootStackScreenProps<'Screen-Tabs'>) => { +const ScreenTabs = () => { const { colors } = useTheme() const [accountActive] = useGlobalStorage.string('account.active') @@ -50,19 +50,19 @@ const ScreenTabs = ({ navigation }: RootStackScreenProps<'Screen-Tabs'>) => { return case 'Tab-Me': return ( - + + + + ) default: return @@ -74,13 +74,13 @@ const ScreenTabs = ({ navigation }: RootStackScreenProps<'Screen-Tabs'>) => { ({ tabPress: e => { e.preventDefault() haptics('Light') navigation.navigate('Screen-Compose') } - }} + })} > {() => null} @@ -88,15 +88,18 @@ const ScreenTabs = ({ navigation }: RootStackScreenProps<'Screen-Tabs'>) => { ({ + tabPress: () => { + if (navigation.isFocused()) { + navigation.navigate('Tab-Me', { screen: 'Tab-Me-Switch' }) + } + }, tabLongPress: () => { haptics('Light') - //@ts-ignore navigation.navigate('Tab-Me', { screen: 'Tab-Me-Root' }) - //@ts-ignore navigation.navigate('Tab-Me', { screen: 'Tab-Me-Switch' }) } - }} + })} /> )