mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Allow Android drop menu instead of long press
This commit is contained in:
@ -5,6 +5,7 @@ import contextMenuStatus from '@components/ContextMenu/status'
|
||||
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||
import React from 'react'
|
||||
import { createContext } from 'react'
|
||||
import { Platform } from 'react-native'
|
||||
import ContextMenu, {
|
||||
ContextMenuAction,
|
||||
ContextMenuProps
|
||||
@ -27,7 +28,7 @@ const TimelineContextMenu: React.FC<Props & ContextMenuProps> = ({
|
||||
disabled,
|
||||
...props
|
||||
}) => {
|
||||
if (!status || !queryKey) {
|
||||
if (!status || !queryKey || disabled || Platform.OS === 'android') {
|
||||
return <>{children}</>
|
||||
}
|
||||
|
||||
@ -61,9 +62,7 @@ const TimelineContextMenu: React.FC<Props & ContextMenuProps> = ({
|
||||
rootQueryKey
|
||||
})
|
||||
|
||||
return disabled ? (
|
||||
<>{children}</>
|
||||
) : (
|
||||
return (
|
||||
<ContextMenuContext.Provider value={actions}>
|
||||
<ContextMenu
|
||||
actions={actions}
|
||||
|
Reference in New Issue
Block a user