mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Allowing toot to be copied when highlighted
This commit is contained in:
@ -14,6 +14,7 @@ export interface Props {
|
||||
status?: Mastodon.Status
|
||||
queryKey?: QueryKeyTimeline
|
||||
rootQueryKey?: QueryKeyTimeline
|
||||
disabled?: boolean // Allowing toot to be copied when highlighted
|
||||
}
|
||||
|
||||
export const ContextMenuContext = createContext<ContextMenuAction[]>([])
|
||||
@ -23,6 +24,7 @@ const TimelineContextMenu: React.FC<Props & ContextMenuProps> = ({
|
||||
status,
|
||||
queryKey,
|
||||
rootQueryKey,
|
||||
disabled,
|
||||
...props
|
||||
}) => {
|
||||
if (!status || !queryKey) {
|
||||
@ -59,7 +61,9 @@ const TimelineContextMenu: React.FC<Props & ContextMenuProps> = ({
|
||||
rootQueryKey
|
||||
})
|
||||
|
||||
return (
|
||||
return disabled ? (
|
||||
<>{children}</>
|
||||
) : (
|
||||
<ContextMenuContext.Provider value={actions}>
|
||||
<ContextMenu
|
||||
actions={actions}
|
||||
|
Reference in New Issue
Block a user