1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
Android does not support true context menu anyway, thus removing per toot component.
This commit is contained in:
xmflsct
2022-11-20 14:41:41 +01:00
parent bf8826fec4
commit fbfae52627
3 changed files with 140 additions and 114 deletions

View File

@ -17,7 +17,7 @@ import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import { uniqBy } from 'lodash'
import React, { useRef } from 'react'
import { Pressable, StyleProp, View, ViewStyle } from 'react-native'
import { Platform, Pressable, StyleProp, View, ViewStyle } from 'react-native'
import { useSelector } from 'react-redux'
import TimelineContextMenu from './Shared/ContextMenu'
import TimelineFeedback from './Shared/Feedback'
@ -156,6 +156,15 @@ const TimelineDefault: React.FC<Props> = ({
return disableOnPress ? (
<View style={mainStyle}>{main()}</View>
) : Platform.OS === 'android' ? (
<Pressable
accessible={highlighted ? false : true}
style={mainStyle}
onPress={onPress}
onLongPress={() => {}}
>
{main()}
</Pressable>
) : (
<TimelineContextMenu
copiableContent={copiableContent}